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

Screenshots or screen recordings

Before After
Screenshot_2026-03-02_at_19.25.10 Screenshot_2026-03-02_at_19.21.26
Screenshot_2026-03-02_at_19.24.44 Screenshot_2026-03-02_at_19.22.01
Screenshot_2026-03-02_at_19.20.56 Screenshot_2026-03-02_at_19.20.37

How to set up and validate locally

  1. Enable the feature flag:

    Feature.enable(:enable_inputs_for_mr_pipelines)
  2. Create a .gitlab-ci.yml file 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 ]]"
  3. Create a merge request in the project

  4. Navigate to the merge request's Pipelines tab

  5. Click the dropdown on the "Run pipeline" button and select "Run pipeline with modified values"

  6. 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
  7. Modify the input values and submit the form

  8. 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.

Edited by Anna Vovchenko

Merge request reports

Loading