How-To: Setup Auto-Builds for your Github/Bitbucket Projects in GCP

Head over to Google Cloud Platform - Cloud Build - Add Trigger

  • Select the project from the dropdown in the Navbar

  • Select Source (Github/Bitbucket)

  • You’ll be redirected to Authenticate (authorise it!)

  • Select the repository you want to automatically build images (Obligatory note: your app should be dockerized and your repo should have Dockerfile)

  • Give your trigger a Name

  • Select Trigger Type (Branch/Tag)

  • Configure other trigger configs (Dockerfile location, Dockerfile name, image name, etc) (Optional)

  • Create Trigger (Voila!)

  • Rinse, repeat for other repositories you want to configure.