Reputation: 13
How can we trigger different project’s job. For example, I have parent job “abc” has repository like “https://github.n.com/user_name/abc”. After building this job successgully, I have to trigger next job “xyz” has repository like “https://github.n.com/user_name/xyz”. Both the project have different repository location. My question is that how can abc project build trigger xyz project build. Thanks, Rahul
Upvotes: 1
Views: 74
Reputation: 508
According to their docs, you can use the workflow functionality to create a follow up line of build jobs.
https://circleci.com/docs/2.0/#using-the-workflows-functionality
version: 2
jobs:
one:
docker:
- image: circleci/ruby:2.4.1
steps:
- checkout
- run: echo "A first hello"
- run: sleep 25
two:
docker:
- image: circleci/ruby:2.4.1
steps:
- checkout
- run: echo "A more familiar hi"
- run: sleep 15
workflows:
version: 2
one_and_two:
jobs:
- one
- two
As for them being on different repos, I assume you can call git clone
instead of checkout (in case checkout doesn't support passing the url).
Edit: Some more docs on workflows are available here: https://circleci.com/docs/2.0/workflows/
Upvotes: 1