Cannot use optional with child pipeline needs
Summary
When using child pipelines its not possible to use optional for needs referenced from the parent using pipeline
Steps to reproduce
- trigger a child pipeline with reference to the parent:
job:
variables:
- PARENT_PIPELINE_ID: $CI_PIPELINE_ID
trigger:
include:
file: 'another-file.yml'- child has a job with a needs
job:
needs:
- pipeline: $PARENT_PIPELINE_ID
job: build
optional: true- fails because of the ci linter
Example Project
What is the current bug behavior?
A pipeline with this config results in a CI lint error:
Found errors in your .gitlab-ci.yml:
jobs:plan:needs:need config contains unknown keys: optional
You can also test your .gitlab-ci.yml in CI LintWhat is the expected correct behavior?
Its always possible to use optional for job needs.
Output of checks
This bug happens on GitLab.com
Related
Edited by 🤖 GitLab Bot 🤖