Variable support for when keyword

Problem to solve

I frequently reuse CI jobs across projects with includes. There are cases where I want to dynamically set the when behavior of jobs between manual and on_success (e.g. continuous delivery with manually-triggered deployment vs continuous deployment). Currently, GitLab does not support variables in the when keyword and throws a template error.

Intended users

  • Release Managers

Further details

Proposal

Allow the GitLab variable expansion mechanism to evaluate variables in the when keyword

Permissions and Security

No additional permissions

Documentation

Testing

What does success look like, and how can we measure that?

Ability to modify when behavior based on a variable's value

What is the type of buyer?

Core/Free

Links / references

Assignee Loading
Time tracking Loading