Draft: Add write-file subcommand to helper binary
What does this MR do?
Adds a write-file
subcommand to the helper binary.
Why was this MR needed?
This introduces a mechanism for us to write files to the job's environment without relying on shell script.
Maintaining different shell scripts is difficult and error prone.
What's the best way to test this MR?
Manual test sub-command
# create file
echo "hi" | ./gitlab-runner write-file -mode 777 my-file
# check contents
cat my-file
# check mode
stat my-file
Kubernetes
This sub-command is used by Kubernetes:
Follow the same steps of "how to test this MR" from !3900 (merged).