During building of git pipeline you may need to add some values which you dont want to expose in the pipeline , or some constants you wish, or some value you may need to change later . In that situation its better to have a variable outside the code. You can create as follows.
- Go to you gitlab projects path
- In the last there will be settings
- In Settings => CI/CD
- In CI/CD => Variables
- You can enter values there Key [ The variable that you wish to accept from gitlab-cy.yml ] and its value
- You can directly access those value in the gitlab-cy.yml , by prefixing “$”
example
key : $PROD_ENV_ADDRESS
value freshers.in/tags/python
Once you have CI/CD open go to the variables