We are using Bitbucket as our version control tool. Builds and deployments are executing on Google Cloud Platform.
All builds are triggered via build triggers as specified in Google Cloud docs. This works great, but we would like to get a build status feedback for specific branch in Bitbucket or preferably on pull request.
I did some research, but I didn't find anything useful on this specific topic. There is a note in Google Cloud docs considering build on pull request which doesn't give us much hope:
"Whether based on branch commits or tag commits, builds are only triggered on pushes to the remote origin. Builds do not trigger on local changes, pre-submits, or pull requests."
GitHub seems to have a very good integration with Google Cloud Build which supports Build status feedback.
Is possible to get Google Cloud Build status feedback in Bitbucket on pull request/remote push and if it is, how? How are you dealing with this problem?
Here we've made use of, out of the box, integration between Google Cloud Build and Google Pub/Sub. Connected into this default topic cloud_builds
we have a Google Cloud Function responsible for making an HTTP
request into Bitbucket REST API. This API has a current 2.0
version but several examples still mention the past version 1.0
, so be careful about the potential issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With