Child Pipeline does not inject Pipeline Execution Policy YAML
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When a Project with a Compliance Framework and Pipeline Execution Policy triggers a child pipeline, the configuration from the policy is not injected into the child pipeline.
Steps to reproduce
- Create a project called
Compliance-Framework -
Create a new Compliance Framework and assign the
Compliance-Frameworkproject. - Configure a Pipeline Execution Policy with YAML:
compliance-test:
stage: test
script:
- echo "compliance job ran"
- Create a project called
Project-Aand add the compliance framework created in step 2 - Create a
.gitlab-ci.ymlfile and achild.ymlfile inProject-Awith the following configurations:
.gitlab-ci.yml:
parent-job:
stage: test
script:
- echo "This is the parent pipeline"
trigger-child:
trigger:
include: child.yml
child.yml
child-job:
stage: test
script:
- echo "child pipeline"
- Run a pipeline in
Project-Aand observe that thecompliance-testjob is included in the parent pipeline but it is not included in the child pipeline.
What is the current behavior?
The Pipeline Execution Policy YAML is not injected into the child pipeline.
What is the expected behavior?
The Pipeline Execution Policy YAML should be injected into the child pipeline and run the defined Compliance Jobs. In this example, the compliance-test job should run in the child pipeline.
How to solve it?
Ideas:
- add configuration option to Pipeline Execution Policy to allow to inject also for child pipelines (ie. list of sources where pipeline is extended with YAML from the policy)
Edited by Grant Hickman