CI_PROJECT_NAME not being expanded
Summary
CI_PROJECT_NAME
isn't expanded and this broke during my upgrade from 11.4 to 11.7 (I think I was running 11.4)
Steps to reproduce
use CI_PROJECT_NAME
in a variable and it's not expanded.
# .gitlab-ci.yml
variables:
docker_registry: docker-registry.example.com
docker_image: group/${CI_PROJECT_NAME}
tag: ${docker_registry}/${docker_image}:${CI_COMMIT_SHORT_SHA}
$ docker build --pull -t ${tag} -f Dockerfile .
invalid argument "docker-registry.example.com/group/${CI_PROJECT_NAME}:9e5cf45d" for "-t, --tag" flag: invalid reference format: repository name
Example Project
git@gitlab.com:kneufeld/example1.git
What is the current bug behavior?
prints out building and pushing tag docker-registry.example.com/artsman/{CI_PROJECT_NAME}:589ba03c
What is the expected correct behavior?
prints out building and pushing tag docker-registry.example.com/artsman/example1:589ba03c
Relevant logs and/or screenshots
see output of: https://gitlab.com/kneufeld/example1/-/jobs/153900322
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)