I have a modified auto-devops pipeline that writes CI variables to a file in my app and deploys the app to kubernetes.
The variables are not set as protected due to this being a test version.
When a variable is changed in the CI/CD settings of gitlab.com and the pipeline is rerun, the value does not update in the pipeline. It still shows the old value.
So for example if
foo was equal to
bar and then you were to change it to
baz the value would still be
bar instead of the new value of
Here is the .gitlab-ci.yml for reference
include: - template: Auto-DevOps.gitlab-ci.yml build: before_script: - echo "FOO=$BAR" >> .env
When I access the pod shell and read the file
FOO is equal to the old value not the new one.
Here is a list of things I’ve tried:
- Clearing the runner cache
- Clearing the cluster cache
- Deleting all of the deployments related to the app
- Deleting artifacts and containers in the GitLab registry
- Manually entering in the variables during manual trigger of pipeline
- Creating a new branch
- Searching forums
- Aging 30 years and losing hair
- Cutting out gluten
Only creating a new branch updated the value in the file.
I really don’t want to have to create a new branch every single time a variable value gets changed.
I would think that updating the variable in the variables would allow the next run to use the updated value.
I’m very confused with this behavior and I don’t know if this is a bug, or if it is something I just don’t understand.
Some help could be greatly appreciated, thanks.