Skip to content

Child Pipeline ignoreing Jobs without Rules

Summary

When triggering a child pipeline, the jobs which have no rule assigned are skipped.

Steps to reproduce

Create basic pipeline. Trigger Child pipeline in file (same repo is easiest)

Example Project

Private repo used.

stages:
  - prepare

.triggerPipeline:
  stage: prepare
  trigger:
    include:
      - ci/.someOtherFile.yml
    strategy: depend
    forward:
      pipeline_variables: true
      yaml_variables: true
  
ActualJob: 
  extends: .triggerPipeline
  rules:
    - if: $CI_PIPELINE_SOURCE == $CI_PIPELINE_SOURCE
      when: always

.someOtherFile.yml

iamskipped:
  script:
    - echo "Oh look I don't exist"
iamalsoskipped:
  script:
    - echo "Oh look I don't exist"
  when: always
irun:
  script:
    - echo "Oh look I exist"
  rules:
    - if: $CI_PIPELINE_SOURCE == $CI_PIPELINE_SOURCE
      when: always

What is the current bug behavior?

See Above

What is the expected correct behavior?

Run the jobs

Relevant logs and/or screenshots

Provided example YAML

This bug happened on a private deployment of gitlab.

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Application Check

No access to run Application check

Version:

GitLab Enterprise Edition v16.6.4-ee

Possible fixes

Edited by 🤖 GitLab Bot 🤖