Skip to content

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

  1. Create a project called Compliance-Framework
  2. Create a new Compliance Framework and assign the Compliance-Framework project.
  3. Configure a Pipeline Execution Policy with YAML:
compliance-test:
    stage: test
    script:
        - echo "compliance job ran"
  1. Create a project called Project-A and add the compliance framework created in step 2
  2. Create a .gitlab-ci.yml file and a child.yml file in Project-A with 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"
  1. Run a pipeline in Project-A and observe that the compliance-test job 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