Good afternoon.
As in GitLab CI change the value of a security variable inside .gitlab-ci.yml. Required to increment the value of the variable with each push
Runner from executor “shell” in Windows
In gitLab ci defined variable “BUILD_NUMBER” (Project->Settings->Variables -> Key “BUILD_NUMBER” and value “1”)
…
test_job:
stage: test
script:
- echo %BUILD_NUMBER% #
- set /A BUILD_NUMBER=%BUILD_NUMBER%+1
- echo %BUILD_NUMBER%
…
Output
…
echo %BUILD_NUMBER%
1
set /A BUILD_NUMBER=%BUILD_NUMBER%+1
$ echo %BUILD_NUMBER%
2
…
But in the Project-> Settings-> Variables value does not change
Sorry for my English. Thank you.