I am using a gitlab for my project where I am defining an environment variable inside "Settings->CI/CD->Environment variables" and initializing value of it as "0". Now as part of CI pipeline, I want to modify the value of this environment variable and want to increase by 1. I am trying to do this in my gulp file:
gulp.task('incrementBuildId', function()
{
process.env.BUILD_ID = buildId + 1;
});
However the value of environment variable isn't getting changed. Am I doing anything wrong here? Is there any other way to have a global environment variable and keep changing it's value?
.gitlab-ci.yml, it should be in the root folder of your project.