0

On Gitlab-CI, I have two projects that work together. Sometime only project A is updated, sometime only B and sometime A+B (when the releases are linked). I would like to create a pipeline on each project that launches one project and trigger the other only if necessary. I used downstream trigger but I'm facing two situations that are in conflict:

When I only push on A on branch release-*, I want to trigger master on B and vice versa

When I push on A and B because the release is linked to the two projects, it will trigger pipeline A then B, then B will trigger A, then A will trigger B, and this forever. (I didn't test this case but in theory that will happen)

Any ideas how to solve this situation?

Using chatops with Slack is a solution that can be considered.

1 Answers1

0

I found the answer simply by playing around with the CI_PIPELINE_SOURCE in the downstream pipeline. If $CI_PIPELINE_SOURCE == "pipeline", don't execute this task.