Skip to content

Add support to user defined variable for manual_confirmation

  • 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

What does this MR do and why?

Add support to user defined variable for manual_confirmation MR acceptance checklist

Connected to #468971

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot 2567-09-09 at 20.48.49.png Screenshot 2567-09-12 at 09.48.50.png

How to set up and validate locally

  1. Add .gitlab-ci.yml with this context

    variables:
      GLOBAL_VAR: "A global variable"
    
    stages:
      - build
      - test
    
    build-job:
      stage: build
      variables:
        JOB_BUILD_VAR: "A job variable"
      script:
        - echo "Variables are '$GLOBAL_VAR' and '$JOB_BUILD_VAR'"
      when: manual
      manual_confirmation: "Variables are '$GLOBAL_VAR' and '$JOB_BUILD_VAR'"
    
    test-job:   
      variables:
        JOB_TEST_VAR: "A job variable"
      script:
        - echo "Variables are '$GLOBAL_VAR' and '$JOB_TEST_VAR'"
      when: manual
      manual_confirmation: "Variables are '$GLOBAL_VAR' and '$JOB_TEST_VAR'"
  2. Manual confirmation modal should be replaced by variables.

Edited by Phawin Khongkhasawan

Merge request reports

Loading