6

Google Container Builder documentation says it can build a Branch or a Tag. What about building a Pull Request? This functionality is critical prior to merging code so main development branch is kept clean as much as possible.

On this page there is even a notation that pull-requests will not be built. Why not support Pull Request builds?

rvora
  • 91
  • 4

3 Answers3

1

Not today, at least not natively. Stay tuned. :)

Jason Hall
  • 20,632
  • 4
  • 50
  • 57
1

It looks like you can achieve this using the GitHub app according to this guide. Nothing for bitbucket though, which is what we use.

Also, @Irvi this just builds on all commits. The goal here is to only build when someone triggers a pull request.

Jonas D
  • 258
  • 5
  • 14
0

This can be done currently with the following scenario:

  • Create a Container Builder build steps which is actually trigger all build for each branch
  • Create a Cloud Functions as a subscriber for build events available as cloud-builds topics in Google PubSub ans then create a status event using API provided by Github. We can customize the content of the status and we can see the green check mark if the build is passed on each of commit that being pushed to Github.
irvifa
  • 1,865
  • 2
  • 16
  • 20