Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

run a pipeline when merge request was created on gitlab

workflow:
    rules:
        - if: $CI_PIPELINE_SOURCE == "merge_request_event"
        - if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "push"

job1:
  script:
    - echo "This job runs in merge request and also after merge to main branch"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #run #pipeline #merge #request #created #gitlab
ADD COMMENT
Topic
Name
8+9 =