In my gitlab-ci.yml file I’m using a template job that defines an empty job variable, let’s call it MY_VAR. I use this variable both in the artifact name and the environment name. Later, in an actual job where I map merge that template I change this variable. I expected that both the artifact and the environment would have the name of that variable but actually only the artifact has this name. Did I find a bug or is this behavior expected?
Example yaml file:
.template: &temp
script:
- echo
variables:
MY_VAR: ""
artifacts:
name: test$MY_VAR
paths:
- test
environment:
name: test/$MY_VAR
actual_job:
<<: *temp
variables:
MY_VAR: "job1"
Edit: I should probably mention we are using GitLab Community Edition 8.14.4 and the gitlab-ci-multi-runner 1.8.0