0

I made a pipeline with one stage - compile & test which has one job that runs go test and has a trigger:

rules:
  - if: '$CI_MERGE_REQUEST_ID'

Before having that rule in the end, Gitlab would run 2 pipelines for me - 1 detached and 1 against the target branch (into which we're aiming to merge). After introducing the above rule Gitlab got rid of attempting to run a second pipeline against the merge target branch and runs only a pipeline in detached mode.

My end goal is to have a trigger implemented with rules such that gets triggered:

  1. When commits are being pushed to the MR
  2. When I'm about to merge
  3. When for some time no updates on the MR branch have occurred, it runs the stage against the target branch. Essentially, the so-called merge results pipeline.

Hence, how can I achieve all from 1. to 3. using rules?

KDX2
  • 945
  • 2
  • 14
  • 31
  • What is your question? – Aleksey Tsalolikhin May 22 '20 at 02:07
  • How to implement a merge results pipeline using rules? One, that in a merge request goes and looks ahead and runs checks for merge conflicts with the target branch and if it fails - denies the merge. While doing that, also not running 2 pipelines for every commit. – KDX2 May 22 '20 at 09:26

0 Answers0