2

I need to specify the stage instead of triggering the whole thing. This is how it's currently configured.

stage: bridge
trigger:
   project: user/project2
   branch: master
   strategy: depend

1 Answer 1

3

You can specify variables in the parent pipeline which you can check in the child pipeline and specify the job creation via rules. In the below example only job1 is run as only the variable $FOO is set in the parent pipeline.

You parent pipeline:

test:
  stage: test
  variables:
    FOO: bar
  trigger:
    project: user/project2
    branch: master
    strategy: depend

Your child pipeline can look like this:

stages:
 - job1
 - job2

job1:
  stage: job1
  script:
    - echo "job1"
  rules:
    - if: '$FOO'

job2:
  stage: job2
  script: 
    - echo "job2"
  rules:
    - if: '$BAR'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.