6

Trying to run some task after merge request get accept (only on master branch). I am aware of only: - master -merge_requests config options, but want to specifically run pipeline only when code get merged in master.

030
  • 13,235
  • 16
  • 74
  • 173
Randeep tomar
  • 61
  • 1
  • 2

2 Answers2

1

https://docs.gitlab.com/ee/ci/yaml/

https://gitlab.com/gitlab-org/gitlab-ce/issues/31296#note_34944784

integration-testing:
  stage: test
  only:
    - master
  script:
    - ./gradlew clean build asciidoctor

Another option is to create a webhook

https://gitlab.scm.webanywhere.co.uk/help/user/project/integrations/webhooks.md

If the "Merge request events" is clicked one could trigger a pipeline if a Pull Request gets updated, created or merged.

030
  • 13,235
  • 16
  • 74
  • 173
  • Thanks for the response. I am aware of only - master, but this will gonna trigger pipeline even if some creates a merge request too, I want to trigger the pipeline once the merge request is accepted and I don't wanna use hooks for this task. – Randeep tomar Jul 18 '19 at 02:48
0

More options like this.

integration-testing:
  stage: test
  only:
    refs:
      - master
      - /release-.+/

Complete documentation can be found at gitlab doc