Pipeline Path whose execution depends on the failure/success of a root node

So before opening an issue on this I wanted to see whether someone actually has an idea how this can be accomplished right now.

What I have is the following situation:

My project has multiple pipeline paths as basically a monorepo.

I have a gateway job at the beginning of each path that checks for changes since the last release (semantic-release). If there are changes that pipeline path is run.

The issue I have now is that if any of the pipeline paths don’t run, the whole pipeline fails, which obviously is not what I want. However if I attach allow_failure: true to the gateway job, the downstream jobs will always run.

Using rules → changes doesn’t work as its still dependent on whether semantic-release decides there should be a release.

I’ve thought about using Triggered jobs, however those have the issue that they report as failed if they have no content, which those jobs wouldn’t have if they have nothing to do. I can of course always add allow_failure, but that has its own downsides as there might a legitimate failure path.

Is there something akin to allow_failure that skips a whole branch of jobs conditionally.

It seems that the way gitlab itself handles this is by triggering jobs manually not using the gitlab-ci trigger keyword and awaiting their results.

Hi @Blackclaws

I suppose you are using child pipelines which are generated from the ‘gateway jobs’ after you determine if there is a change in particular pipeline path?
If so there is already an issue opened for that Child pipeline fails if there is no job on the current branch (#218538) · Issues · GitLab.org / GitLab · GitLab and a work-around is to have a dummy job that always run as part of the child pipeline.

Right, I know that workaround, unfortunately its exactly that requirement that I want to get around.

My solution right now is to manually trigger child pipelines using finestructure / pipeline-trigger · GitLab