Reputation: 1085
I have to run cloud build trigger one after another and only if first trigger pass it has to move to next trigger. All the triggers are for different repos.
How can i achieve it?
Thanks in advance!
Upvotes: 1
Views: 443
Reputation: 9810
Cloud Build publishes messages on a Google Pub/Sub topic when your build's state changes, such as when your build is created, when your build transitions to a working state, and when your build completes. You can have a look at the doc here for more info.
You could set up a PubSub-triggered Cloud Function to process these events and programmatically launch the next Cloud Build via the API (see the API tab here). This is a but cumbersome since you have to define your builds in the API call's body but as of now there's no chaining capability in Cloud Build.
Upvotes: 1