Add support for variables for the manual confirmation modal
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
This MR adds support for expanding CI/CD variables in manual job confirmation messages. When a job is configured with when: manual and manual_confirmation, the confirmation message will now properly replace variable references like $VARIABLE_NAME with their actual values.
References
This MR resolves Add support for user defined variables for the ... (#468971)
Screenshots or screen recordings
| Before | After |
|---|---|
|
|
How to set up and validate locally
Create a .gitlab-ci.yml file with this content:
variables:
GLOBAL_VAR: "A global variable value"
stages:
- test
manual-job:
stage: test
variables:
JOB_VAR: "A job-specific variable"
script:
- echo "This is a test job"
when: manual
manual_confirmation: "Testing variables expansion: $GLOBAL_VAR and $JOB_VAR"
- Commit this file to a GitLab repository you have access to.
- You should see a pipeline with a manual job. Click the play button (
▶️ ) on the job. - A confirmation dialog should appear. If your implementation is working correctly, you should see:
Custom confimation message: Testing variables expansion: A global variable value and A job-specific variable
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #468971
Edited by 🤖 GitLab Bot 🤖

