Loading
Add possibility to provide variables to MR pipelines
What does this MR do and why?
Adds the ability to provide variables when running merge request pipelines. We previously added support for inputs in MR pipelines, and now extend this to support variables as well.
References
Related to #118798 (closed)
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
-
Create a merge request with a pipeline that uses variables with descriptions:
variables: DEPLOY_ENV: description: "Target deployment environment" test: script: - echo "Running with DEPLOY_ENV=$DEPLOY_ENV" rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" -
Navigate to the MR's Pipelines tab and click "Run pipeline"
-
Add a value for the
DEPLOY_ENVvariable (the description will appear in the UI) -
Run the pipeline and verify the variable is passed correctly in the job output
See CI/CD variables documentation for more details.
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.
Edited by Anna Vovchenko

