Isolated dotenv artifacts between pipelines


I’m adjusting a gitlab_ci.yml file, and using this example GitLab CI/CD variables | GitLab . Now I can’t really figure out what happens when I run two jobs in parallel (since running them, with the current setup will trigger deployments that shouldn’t be triggered).

More particularly, the setup currently is tag based deployments, and I use the first job to parse the tag (regex parsing is too complicated for our use-case), and store tag parts in separate variables (version, deployment environment, ticket number and more information). If I deploy additional pipeline with a different tag, would it override the build.env file, would it have a separate instance of it? Can I safely assume that version information from pipeline A would not “leak” to pipeline B?

If not, what would you suggest? Maybe to use $CI_PIPELINE_ID.env instead of a fixed name?


Hi @iamromand

Would it be possible for you to post the relevant parts of your .gitlab-ci.yml file?