Show helper image in Kubernetes executor job log
What does this MR do?
Updates the Kubernetes executor's Prepare() method to log the resolved helper_image and version tag using BuildLogger.Println instead of BuildLogger.Debugln.
Why was this MR needed?
In the Docker executor, GitLab Runner logs the helper image name and tag to the job trace during preparation (Using helper image: ...).
In the Kubernetes executor, this was previously logged using BuildLogger.Debugln, which writes only to the runner process logs and does not reach the job trace at any setting (even with CI_DEBUG_TRACE=true).
When organizations pull gitlab-runner-helper from internal or custom registries via helper_image, operators and developers without direct Kubernetes cluster or runner host access had no way to verify whether the helper image was up to date. Logging this with Println brings parity with the Docker executor and provides immediate visibility into the active helper image and version tag in the CI job output.
What's the best way to test this MR?
-
Run the unit test suite:
go test -v ./executors/kubernetes -run '^TestPrepare_HelperImageLogging$' -
Execute a job using the Kubernetes executor and verify that the job log includes:
- For default configuration:
Using helper image: registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:<arch>-<version> - For overridden configuration:
Using helper image: <custom_image> (overridden, default would be ...)
- For default configuration:
What are the relevant issue numbers?
Closes #2387 (closed)