CI Multi project pipeline

What’s wrong with my multi project pipeline? I dummed it down to the basics

project1

stages:
  - processing-stage
  - configure-stage

process_echo:
  stage: processing-stage
  tags:
    - docker
  script: echo "Test" > test.yml
  artifacts:
    paths:
      - test.yml
    expire_in: 30 days
  only:
    - schedule

configure_echo:
  stage: configure-stage
  trigger:
    project: /my/project2
    branch: master
    strategy: depend
  only:
    - schedule

project2

stages:
  - test
test_project2:
  stage: test
  tags:
    - docker
  script: cat ./test.yml
  only:
    - schedule

When set a scheduled pipeline it just hangs at the configure-stage

@twnik - Thanks for posting!

Two things come to mind and i’d suggest looking at using rules: instead of only as rules: are the preferred keyword now.

  1. The documentation for only: shows the keyword as schedules not schedule as in your example.
  2. That same issue could be the problem with the second project OR it could be expecting a schedule to trigger it not another pipeline? I haven’t tested it so not 100% certain.

I hope this helps!

-James H, GitLab Product Manager, Verify:Pipeline Execution

Job in your project2 will run only if pipeline is triggered from that project local Schedule. When you trigger a job in another pipeline (no matter how was the pipeline in project1 triggered) the pipeline source changes to pipelines.

So what should it be? I just added

only:

    - schedules

    - pipelines

    - triggers

    - api

but same thing

Sorry, I don’t use only anymore. You can try it with rules:.

Downstream pipeline is stuck also in case the user triggering it doesn’t have permissions on the downstream project. I think Developer role is minimum. I am not sure how scheduled pipeline inherit permissions and if they do or not. In case it is indeed a permission issue, you can try to use trigger token and trigger downstream pipeline using API as documented here.