Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud build is not triggered by 'Push to a branch' event, but triggered by 'Pull request' event

Hi all,

I am working on Cloud build event trigger with Git. My current scenario is that when a DEV branch is merged into TEST branch, the cloud build is triggered and starts to build a new TEST version app. But for some reason, the current cloud build is not triggered when the DEV branch is merged. My questions are;

1. The build is triggered for 'Pull request' event setting but not for the 'Push to a branch' event, doesn't the cloud build take the merge as a kind of push event? (e.g. Github Action pull_request, pull_request triggers a push event)

Screenshot 2024-01-16 at 1.04.24 pm.png

This is the build setting, sorry, I cannot post the whole settings as it's not a personal project.

2. Are we able to set the event trigger for 'Pull request' and trigger it after the merge event happened?

3. Can I get other suggestions to trigger the build when DEV is merged into TEST?

 

I appreciate all your advice. Thank you.

1 1 1,273
1 REPLY 1