Triggering empty pipelines via the trigger keyword should not error
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When triggering a child pipeline whose list of jobs is empty due to the variables set on the trigger, the bridge job fails.
Steps to reproduce
Create two files: .gitlab-ci.yml
trigger_job_success:
variables:
FAIL: 0
trigger:
include: job.yml
trigger_job:
variables:
FAIL: 1
trigger:
include: job.ymljob.yml
simpleJob:
image: alpine
script:
- exit 0
rules:
- if: $FAIL == "0"See the CI output.
Example Project
https://gitlab.com/Blackclaws/pipeline-trigger-erro
What is the current bug behavior?
Trigger job fails
What is the expected correct behavior?
Trigger job succeeds
Possible fixes
This is a general change of behavior. However the only alternative is to always make sure you have a dummy job that does nothing in an otherwise empty pipeline. If this is something that should be opt in you could have a flag on the trigger bridge job: "Allow empty downstream"
allow_failure:true is not an option as that also allows the child pipeline to simply fail which is not the same as being empty