Skip to content
Latchkey

GitLab CI Child Pipeline Errors - Generated YAML Invalid or Missing

A parent job triggers a child pipeline from a YAML file. It fails when that file is missing, when dynamically generated YAML is invalid, or when the generating job did not pass it as an artifact.

What this error means

The trigger job fails or the child pipeline never starts: "config file ... not found", "Invalid configuration format" for the generated YAML, or the bridge job is created but the downstream pipeline errors immediately.

Pipeline / bridge job
Unable to create pipeline:
Child pipeline configuration file `generated-config.yml` not found in the artifacts of job `generate`

Common causes

Generated config not passed as an artifact

A dynamic child pipeline reads YAML produced by an earlier job. If that job does not declare the generated file in artifacts:paths, the trigger cannot find it.

Generated YAML is invalid

A script that emits .gitlab-ci.yml content can produce malformed YAML or an invalid CI structure. The child pipeline fails the same validation a static file would.

Wrong trigger:include path or strategy

The trigger:include:artifact must name the exact file and the job that produced it. A wrong filename or missing job: reference fails to resolve.

How to fix it

Pass the generated config as an artifact

The generating job must emit the file and declare it; the trigger references that job and artifact.

.gitlab-ci.yml
generate:
  stage: build
  script: ./gen-pipeline.sh > generated-config.yml
  artifacts:
    paths:
      - generated-config.yml

run-children:
  stage: test
  trigger:
    include:
      - artifact: generated-config.yml
        job: generate

Validate the generated YAML

  1. Run the generator locally and lint its output as a standalone .gitlab-ci.yml.
  2. Ensure the generated config has at least one visible job and valid keywords.
  3. Confirm the trigger:include:artifact filename matches what the job uploaded.

How to prevent it

  • Lint dynamically generated pipeline YAML in the generating job before triggering.
  • Always declare the generated file in artifacts:paths.
  • Keep the generator deterministic so the child config is reproducible.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →