-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitlab-ci-local overwrites a pre-defined variable from gitlab-ci.yml #1465
Comments
what exactly are you trying to achieve here by overriding because, i don't think it does what you think it does in gitlab.com if not #1330 is probably what you're requesting for |
We got a template that is essentially looking like that:
So we were until now just adapting the CI_PROJECT_DIR to e.g. our docker folder like I think its a bug because the behavior differs between gitlab-ci-local and the real pipeline but its up to you guys to decide on that. I do know that we can easily resolve it on our side but my expection would've been that the prio is more like this: gitlab-ci.yml, .env, global .env and then if some default values are not set set them. |
oo if that's the case why not use other variable name instead of overriding the pre-defined variables ? since it's explicitly recommended against from doing so |
Yeah already did it, just wanted to confirm if this behavior is intended. I mean gitlab says its not recommended is enough for me to close this issue. |
Minimal .gitlab-ci.yml illustrating the issue
Expected behavior
The expected behavior should be that the CI_PROJECT_DIR variable is overwritten by the job's variable.
Expected output should be:
"test > CI_PROJECT_DIR: TEST_DIRECTORY" instead I get "test > CI_PROJECT_DIR: /gcl-builds"
Host information
Ubuntu
gitlab-ci-local 4.56.2
Containerd binary
I'm using docker.
Thank you for this great tool.
The text was updated successfully, but these errors were encountered: