I am using our own image in a GitLab runner. The image is based on Alpine Linux 3.12. During a stage of the script that executes an external shell script, the command fails with the following error:
$ echo "Checking for multidev environment on Pantheon" Checking for multidev environment on Pantheon $ /bin/bash ./gitlab-multidev-ci.sh /usr/bin/env: unrecognized option: S BusyBox v1.31.1 () multi-call binary. Usage: env [-iu] [-] [name=value]... [PROG ARGS] Print the current environment or run PROG after setting up the specified environment -, -i Start with an empty environment -u Remove variable from the environment
The CI script looks like this:
.deploy:pantheon-multidev: extends: .deploy:pantheon script: - *deploy_pantheon_prep - echo "Checking for multidev environment on Pantheon" - "/bin/bash ./gitlab-multidev-ci.sh" - *deploy_pantheon_push
So it is failing on the line:
- "/bin/bash ./gitlab-multidev-ci.sh"
I have tried to remove the quotation marks on that line and that doesn’t make a difference. Same error.
env command included in Alpine Linux does not support the
-S switch. Unfortunately I don’t know when this started happening, but I know that this script used to work within the past year, so is there some reason why the script needs to run
env -S to execute my external shell script within the container? Can I change this behaviour? Avoid it somehow? Perhaps changing my ci script somehow?