Closed justinTM closed 6 months ago
ah i see... it is not compatible with setting any variables via CLI. when i remove all --variable
flags in the command, it succeeds. so definitely a bug. i guess no one uses this feature lol!
it also apparently can't handle multiple VARIABLE
flags inside dotenv file :/
also, when you specify multiple variables inside a single VARIABLE
, it only applies the second one (skipping the first):
# ~/.gitlab-ci-local/.env
VARIABLE="CI_JOB_TOKEN=$GITLAB_ACCESS_TOKEN;DOCKER_HOST='xxxxx'"
❯ gitlab-ci-local 'my-job'
Using fallback branch data
parsing and downloads finished in 21 ms
my-job starting shell (test)
my-job $ if [ -n "$CI_JOB_TOKEN" ]; then echo "can't find CI_JOB_TOKEN!" && exit 1; fi
my-job > can't find CI_JOB_TOKEN!
my-job finished in 11 ms FAIL 1
FAIL my-job
> can't find CI_JOB_TOKEN!
putting a space ` instead of
;` makes it work for the first variable but not for the second:
# ~/.gitlab-ci-local/.env
VARIABLE="CI_JOB_TOKEN=$GITLAB_ACCESS_TOKEN DOCKER_HOST='xxxxx'"
❯ gitlab-ci-local 'my-job'
Using fallback branch data
parsing and downloads finished in 22 ms
my-job starting shell (test)
my-job $ if [ -n "$CI_JOB_TOKEN" ]; then echo "can't find CI_JOB_TOKEN!" && exit 1; fi
my-job $ if [ -n "$DOCKER_HOST" ]; then echo "can't find DOCKER_HOST!" && exit 1; fi
my-job > can't find DOCKER_HOST!
my-job finished in 12 ms FAIL 1
FAIL my-job
> can't find DOCKER_HOST!
https://github.com/firecow/gitlab-ci-local/issues/992 Yeah, we are tracking the issue here
Minimal .gitlab-ci.yml illustrating the issue
Expected behavior nothing is printed -- job succeeds.
Host information macOS gitlab-ci-local 4.47.0
Containerd binary Are you using docker or podman, or any other relevant containerization tool.
Additional context Add any other context about the problem here.