Setting the User Defined Variable Values
Last updated
Last updated
With the PAT generated, you now have all of the information you need to set the user supplied variables. To set them, return back to the project page for which you are defining the workflow.
Refer to this video to see how the GitLab script variables are defined and set.
From the video example above, let's review the steps:
Select Settings from the menu on the left and then select CI/CD;
That takes you to the page where many CI/CD parameters can be set including the variables used in the workflow yml
script. Scroll down through the various options until the Variables option is displayed;
Click on Expand to open it;
To add values for the five required variables, click on Add Variable. This opens a form where you can fill in the proper data;
Enter the name of the variable that you are creating. It must match the name used in the scripts defined previously;
Then, enter the correct value based upon your configuration;
The Protect variable flag defaults to set. Click on it to remove that protection unless required for other purposes;
Clicking on Add Variable on this form sets the variable value;
Repeat this process for the all five variables.
When complete, the Variables option will show all five variables ready for use by the workflow script.