In Gitlab I am trying to trigger child pipeline from parent pipeline. The child pipeline is within the same project under subdirectory. However, while triggering at the time of merge request event it is giving error "downstream pipeline cannot be created, No stages/jobs for this pipeline"
Folder structure:
- Namespace/Project/.gitlab-ci.yml (parent pipeline)
- Namespace/Project/servicename/.gitlab-ci.yml (child pipeline)
Parent pipeline:
trigger_servicename:
stage: triggers
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "dev"'
changes:
- app-notifier/*
when: always
trigger:
include: servicename/.gitlab-ci.yml
strategy: depend
Child pipeline:
image:
name: registry.gitlab.com/who-docker/aws-cli:latest
entrypoint:
- /usr/bin/env
- 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
stages:
-build
build:
stage: build
script:
- echo "run build..."
test:
stage: test
script:
- echo "run test...."