Add ability to configure inputs when triggering MR pipelines (frontend)
What does this MR do and why?
Adds support for configuring pipeline inputs when triggering merge request pipelines. Users can now customize input values before running a pipeline on their merge request, providing more flexibility in pipeline execution.
When triggering a pipeline from a merge request, users can choose to run with modified values. This redirects them to the new pipeline form with the merge request context pre-filled, showing an info alert that explains the pipeline will run on the merge request's source branch. The form automatically selects the correct branch and hides the variables section to focus on input configuration.
Changelog: added
References
- Related to #547861
Screenshots or screen recordings
| Before | After |
|---|---|
|
|
|
|
|
|
How to set up and validate locally
-
Enable the feature flag:
Feature.enable(:enable_inputs_for_mr_pipelines) -
Create a
.gitlab-ci.ymlfile with pipeline inputs:workflow: rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' spec: inputs: environment: default: 'staging' options: - 'staging' - 'production' debug_mode: type: boolean default: false test: script: - echo "Running in $[[ inputs.environment ]] environment" - echo "Debug mode: $[[ inputs.debug_mode ]]" -
Create a merge request in the project
-
Navigate to the merge request's Pipelines tab
-
Click the dropdown on the "Run pipeline" button and select "Run pipeline with modified values"
-
Verify:
- You are redirected to the new pipeline form
- An info alert displays: "You are creating a pipeline for merge request !X. The pipeline will run on the merge request source branch."
- The source branch is pre-selected and matches the merge request's source branch
- The pipeline inputs form is displayed with the configured inputs
- The pipeline variables form is hidden
-
Modify the input values and submit the form
-
Verify:
- The pipeline is created with the modified input values
- The cancel button redirects back to the merge request pipelines tab
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.





