How to propagate status of a child pipeline to the parent pipeline?


In one of our team’s repos, I have introduced the parent-child model. While it works quite nicely, I have noticed an awful inconvenience related to this pattern. Parent pipeline apparently doesn’t receive completion status from its child pipelines, especially when a child pipeline fails. As a result, pipeline visualisation neither tells whether the pipeline is still running nor can you spot a failing (child) pipeline quickly, which is quite inconvenient. Moreover, the " Merge when pipeline succeeds" feature is rendered useless, which is terribly inconvenient.

I would expect that child pipelines propagate their completion status to the parent pipeline. That is, when a child pipeline fails, the parent pipeline becomes also marked as failed.

I would also expect to see the status of child pipelines in the pipeline visualisation - child pipeline running, finished, failed?

Official documentation doesn’t say much about completion status of the child pipeline.

Is this a feature, missing functionality, or am I missing something in the whole Parent-Child Pipeline concept? Is there a way to propagate completion status from the child pipeline to the parent pipeline?

(We are using latest Gitlab, Premium subscription model, on premises.)

Thank you for your help,

1 Like

I tried this figure on a community edition and it seams to work. Indeed the status of the child can be returned to the parent with this option : trigger.strategy=depend that will force the parent job to wait for the result of the child.

By default, the trigger job completes with the success status as soon as the downstream pipeline is created.

To force the trigger job to wait for the downstream (multi-project or child) pipeline to complete, use strategy: depend . This setting makes the trigger job wait with a “running” status until the triggered pipeline completes. At that point, the trigger job completes and displays the same status as the downstream job.

  stage: triggers
      - artifact: .generated-gitlab-ci.yml
        job: generate-ci
    strategy: depend
1 Like

Hello @gpineda-dev,

I have tried it out, works like a charm. In my opinion this capability should be documented more prominently in the context of parent-child pipelines in the official documentation. I would’t have found it if it wasn’t for your hint.

Thank you very much!


1 Like

I had a similar issue and this solved my problem… Thanks!
As @ChildsEye said, would be nice if this is documented more clearly.

1 Like