Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,763
    • Issues 44,763
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,328
    • Merge requests 1,328
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #209070
Closed
Open
Issue created Mar 05, 2020 by Fabio Pitino@fabiopitino2️⃣Maintainer

Ensure that dynamic child pipeline depends explicitly on the generator job

Problem

When using "Dynamic Child Pipeline" feature we are not strictly checking whether the job generating the configurations is a dependency for the trigger job using the generated configuration.

The following snippet has child-pipeline job running before generate-config. This will cause the following behavior:

  1. Parent pipeline is created successfully
  2. Parent pipeline's jobs are enqueued
  3. Trigger job child-pipeline runs and attempts to create a child pipeline
  4. The child pipeline fails with error Job generate-config not found in parent pipeline or does not have artifacts
  5. Trigger job fails by consequence
  6. Parent pipeline fails by consequence
child-pipeline:
  stage: test
  trigger:
    include:
      - artifact: generated-config.yml
        job: generate-config

generate-config:
  stage: deploy
  script: generate-ci-config > generated-config.yml
  when: always
  artifacts:
    paths:
      - generated-config.yml

Expected behavior

  1. Parent pipeline fails immediately showing an error child-pipeline does not depend on a generate-config job

Original discussion: !23790 (comment 298174064)

Edited Apr 14, 2020 by Fabio Pitino
Assignee
Assign to
Time tracking