Hey there GitLab Community,
I’m trying to run a trigger job for a child pipeline. The job failed with the following message:
What I tried:
- remove all rules from the trigger job
- run extremely simple jobs in the child pipeline
- validate the pipeline yml syntax of the child pipeline
- local path with and without a leading slash
I’m running on GitLab.com with GitLab Enterprise Edition 15.10.0-pre.
The trigger job looks as follows where dummy.yml
only includes a simple job with an echo script:
Trigger Dummy:
stage: Downstream
trigger:
include:
- local: "/.gitlab/ci/downstream/dummy.yml"
strategy: depend
rules:
- if: $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "dev"
- if: $CI_MERGE_REQUEST_EVENT_TYPE == "merge_train"
- when: manual
needs: []
Thanks in advance!
Okay the solution can actually be found here.
I had to include
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "parent_pipeline"
in my child pipeline for the jobs to be run in the merge request pipeline.
Summary
Based on discussion 7518, I am unable to rebuild downstream jobs by manually triggering the upstream job
Steps to reproduce
I have pipeline A, B , C that are triggered by a launcher pipeline D upon its completion with SUCCESS
Trigger add to each pipleineJob section in Yaml file is :
pipelineJob('A') {
triggers {
upstream('D', 'SUCCESS')
}
}
When pipeline A, B and C are marked SUCCESS or FAILED while associated with a build version (i.e v2023.x.x.x) , the automatic trigger via pipeline D works correctly
However, if downstream job fails and marked failed with build number # , the automatic trigger via pipeline D does not re-start build despite the SUCCESS status of pipeline D unless I manually rebuild downstream jobs separately
Type of error that caused the downstream job to fail in this case is a checkout failure to git repo
Expected results
When triggering pipeline D and upon completion with SUCCESS : downstream jobs A, B and C should be triggered and start build despite having failed before
Actual results
When triggering pipeline D and upon completion with SUCCESS : downstream jobs A, B and C are not triggered
Additional context