Im using gitlab 8.1.4. And using gitlab-ci thats comes built-in. By default, gitlab-ci is triggering build for every push. How can make it trigger only during creation of merge request?
Thanks in advance
Try the following into your .gitlab-ci.yml file.
stage: build
script:
- xxxxx
artifacts:
paths:
- xxxxx
tags:
- xxxx
only:
- merge_requests
Source: https://docs.gitlab.com/ee/ci/yaml/#only-and-except-simplified
You could try gitlab-ci-build-on-merge-request. Gitlab issue that explores other options - https://gitlab.com/gitlab-org/gitlab-ci/issues/360.
Disclaimer: I'm the author of gitlab-ci-build-on-merge-request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With