Recover helper argv when image entrypoint drops CMD

What does this MR do?

Recover helper argv when image entrypoint drops CMD

Native steps fails silently on images with ENTRYPOINT ["/bin/sh", "-c"]. sh -c consumes CMD[0] as its script and CMD[1:] as positional params $0/$1/... that aren't forwarded across the exec to the script. The helper ends up with argv=[helper], urfave/cli prints --help and exits 0, and ErrNoStepRunnerButOkay marks the job successful with no script run.

The Docker executor now sets _GITLAB_RUNNER_HELPER_NATIVE_STEPS_ARGV on the build container holding the helper's expected argv (base64-encoded JSON). The helper reads it in main before urfave/cli, reconstructs os.Args when len(os.Args)==1, then unsets the var so user commands don't inherit it.

What are the relevant issue numbers?

Closes step-runner#464 (closed)

Merge request reports

Loading