Hi all,
For a project me & my team are working on we need to implement the following with Gitlab CI:
After a MR has been merged on a release branch a pipeline should trigger a build job and automatically start deploy job that deploys to our dev environment. A manual action is available for deploying to staging.
For production this would be the same case as with the release but then for master.
Currently I have not found a way to start certain jobs or a pipeline directly after a MR has been merged.
Current setup:
build:
stage: build
image: docker:stable
services:
- docker:dind
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == /^release\/.*$/'
when: on_success
<<: [*build_before, *build_script, *build_after]
However this part runs when the MR is created I need this to be created after the MR has been merged.
Anyone idea’s or tips to be able to achieve this would be very helpfull!