Allow for variable substitution in CI tag names (Dynamic Tags)
The issue to follow for the Dynamic Tags use case is the Expand YAML element values using new topological sorting logic
Problem to solve
This is a feature request coming from a previously closed issue. There has been requests from multiple customers to implement it. This feature would allow tags within the gitlab-ci.yml file to be able to utilize variables, which they currently are not able to.
In this closed issue, a user points out that utilizing a variable like
$CI_BUILD_REF_NAME does not work and actually hangs in the
deploy: stage: deploy environment: name: $CI_BUILD_REF_NAME only: - /^env-.*$/ tags: - deploy - $CI_BUILD_REF_NAME
The issue has been closed but multiple paying customers in the last ~5 months have asked for it to be looked at as a viable feature again.
The proposal from the previous issue included these possible solutions --
When evaluating a .gitlab-ci.yml file to schedule a job, first perform variable substitution prior to the logic used for selecting a runner.
Additionally consider implementing regex-style variable manipulation as proposed in gitlab-foss#24044 (closed). These two improvements combined would be especially powerful.
Permissions and Security
What does success look like, and how can we measure that?
What is the type of buyer?
Links / references
Related customer info: