Search code examples
variablesgitlabenvironment-variablespipelinecicd

GitLab scheduled pipeline variables


I have a little confusion in GitLab scheduled pipeline variables. I see there is a section to add variables when scheduling a pipeline as shown below. enter image description here

However, there is a section to add variables for the whole project in Settings -> CI/CD -> Variables, as shown below. enter image description here

My question is does the scheduled pipeline gets access to the variables defined under the settings anyway? I think the variable section under the scheduled pipeline is given to add extra variables or override existing variable. Thank you in advance.


Solution

  • you can define variables in different levels in gitlab CI based on the relevance or best place they are needed. the variables are taken based on the specificity.

    1. project variables can override group variables.
    2. Schedule variables can override project variables as they're similar to passing variables via manual job.