Override a defined CI/CD variable in a gitlab job

Viewed 5553

i am currently facing an issue using Gitlab-ci. i am using gitlab 13.12 community edition. I want to be able to override the value of a CICD variable from within a gitlab-ci.yml job.

you might say that i could just pass out the value from one job to another but the goal is to change that value so that , on the next pipeline , all my jobs will use the updated one.

To be precise , i want to be able to change MY_CICD_VARIABLE_TO_CHANGE that i've defined in project > cicd > variables. and update this value from a gitlab-ci job

something like this but not only change it for the current pipeline but update it :

change_variable_value:
  stage: "change_variable"
  image: myimage
  script:
    - $MY_CICD_VARIABLE_TO_CHANGE="value_changed"

, i tried to do every single solutions specify here : https://docs.gitlab.com/13.12/ee/ci/variables/index.html#override-a-defined-cicd-variable

nothing seems to work. I also tried to use artefact but it seems that i am not able to pass artefact between 2 distinct pipelines, they have to be part of the same pipeline , even by curling the api (at least in the community edition)

Any idea is more than welcome :)

0 Answers
Related