CI/CD Steps failing
Summary
It seems since GL 18.6, steps are not running as they used to. Same error with runner 18.6.1.
Our simple CI/CD steps is now failing. It always worked fine and we didn't change anything.
In the log we can see step_runner being injected with 18.5 but not with 18.6.
I tried to look in the forums/issues can't see anything except maybe that: #39110
Steps to reproduce
- Create a steps
- Use the step in a job
- Run the pipeline
# step code
spec:
---
exec:
command:
- bash
- -c
- |
echo "Login to ${{job.CI_SERVER_HOST}} with gitlab-ci-token user"
printf "machine ${{job.CI_SERVER_HOST}} login gitlab-ci-token password ${{job.CI_JOB_TOKEN}}" >> .netrc
docker login -u ${{job.CI_REGISTRY_USER}} -p ${{job.CI_REGISTRY_PASSWORD}} ${{job.CI_REGISTRY}}
Actual behavior
Job fails with ERROR: Job failed: step "docker_login": exec: exec: "bash": executable file not found in $PATH
Expected behavior
Job passing.
Relevant logs and/or screenshots
job log with runner 18.5 (working)
Running with gitlab-runner 18.5.0 (bda84871)
on Docker build image vrtzcD73j, system ID: r_UwmauEMRan1Z
Resolving secrets
Preparing the "docker" executor
00:03
Using Docker executor with image registry.gitlab.com/gitlab-org/step-runner:v0 ...
Using effective pull policy of [always] for container registry.gitlab.com/gitlab-org/step-runner:v0
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image registry.gitlab.com/gitlab-org/step-runner:v0 ...
Using docker image sha256:ba9bbdc659f7487b6add8a8d6b416716b7167838eaf148147e10a945b3faadb0 for registry.gitlab.com/gitlab-org/step-runner:v0 with digest registry.gitlab.com/gitlab-org/step-runner@sha256:6c914743abeae535f07a4373bc73c9267de3ac7989622dcd00adaa38b211894b ...
Preparing environment
00:02
Using effective pull policy of [always] for container registry.gitlab.com/gitlab-org/step-runner:0.16
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image registry.gitlab.com/gitlab-org/step-runner:0.16 ...
Using docker image sha256:834cb48cb4830564418c79cb49047808aa3791b016a8ca2032c41679a38aafbe for registry.gitlab.com/gitlab-org/step-runner:0.16 with digest registry.gitlab.com/gitlab-org/step-runner@sha256:205a3f27c454f838c6d1e0faf97c3985959d8bc9b30be768182b79428fe182a1 ...
Using effective pull policy of [always] for container sha256:b2942ed620fb4e87b3aefdfda8bd6148719dbd1df1ff695ebf972d728b26dc54
Running on runner-vrtzcd73j-project-64214663-concurrent-0 via 2aaae609bf56...
Getting source from Git repository
00:02
Gitaly correlation ID: 9a199d1ea4fd0c18-LHR
Fetching changes with git depth set to 40...
Reinitialized existing Git repository in /builds/reassured-ltd/crm/be-api/.git/
Created fresh repository.
Checking out aa65631c as detached HEAD (ref is main)...
Removing environment.env
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:14
Using effective pull policy of [always] for container registry.gitlab.com/gitlab-org/step-runner:v0
Using docker image sha256:ba9bbdc659f7487b6add8a8d6b416716b7167838eaf148147e10a945b3faadb0 for registry.gitlab.com/gitlab-org/step-runner:v0 with digest registry.gitlab.com/gitlab-org/step-runner@sha256:6c914743abeae535f07a4373bc73c9267de3ac7989622dcd00adaa38b211894b ...
Running step "docker_login"```
Running step "docker_login"
Login to gitlab.com with gitlab-ci-token user
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your credentials are stored unencrypted in '/root/.docker/config.json'.
Configure a credential helper to remove this warning. See
https://docs.docker.com/go/credential-store/
Login Succeeded
[etc.]
job log with runner 18.6 (failing)
Running with gitlab-runner 18.6.0 (3a847532)
on Docker build image vrtzcD73j, system ID: r_UwmauEMRan1Z
Resolving secrets
Preparing the "docker" executor
00:02
Using default image
Using Docker executor with image docker:29 ...
Using default image
Using effective pull policy of [always] for container docker:29
Pulling docker image docker:29 ...
Using docker image sha256:e31dbb0fb5be21256b536b8650b8a7dc3dcf2f72167c8d486685e272df439e7a for docker:29 with digest docker@sha256:9b17a9f25adf17b88d0a013b4f00160754adf4b07ccbe9986664a49886c2c98e ...
Preparing environment
00:00
Using effective pull policy of [always] for container sha256:56febdf39439a354363cc92297e8e34e0ec36f99997095638214b10ced6c6c61
Running on runner-vrtzcd73j-project-64214663-concurrent-0 via 8d37f62f0f4b...
Getting source from Git repository
00:02
Gitaly correlation ID: 9a212d3c80666331-IAD
Fetching changes with git depth set to 40...
Reinitialized existing Git repository in /builds/reassured-ltd/crm/be-api/.git/
Created fresh repository.
Checking out b339bd80 as detached HEAD (ref is main)...
Skipping Git submodules setup
Executing "step_run" stage of the job script
00:01
Using default image
Using effective pull policy of [always] for container docker:29
Using docker image sha256:e31dbb0fb5be21256b536b8650b8a7dc3dcf2f72167c8d486685e272df439e7a for docker:29 with digest docker@sha256:9b17a9f25adf17b88d0a013b4f00160754adf4b07ccbe9986664a49886c2c98e ...
Running step "docker_login"
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: step "docker_login": exec: exec: "bash": executable file not found in $PATH
Environment description
We are on gitlab.com with self hosted runners.
Used GitLab Runner version
Docker executor, gitlab runner 18.6 or 18.6.1
Possible fixes
Edited by Florian Velcker