Google Cloud Container Builder: An Introduction

Recently, we have been using Google's container engine for deploying our apps, an intro to which can be found here. The code used throughout this post can be found here.

Up to now we have been building, testing and deploying our containers from Circle CI, recently however Google have released the cloud container builder which has piqued our interest for a few reasons:

  1. Our images will be built close to where they are being deployed which will hopefully lead to an increase in commit to deploy speed.
  2. Having the power to run anything that you can run in a container.
  3. A generous amount of free build time (120 mins/day at the time of writing).
  4. Simple parallelisation of build steps.

Introduction

So, what is Google cloud container builder? Simply put, it is a replacement for other CI processes where each build step is actually its own docker container with your code mounted and working directory set to /workspace.

Setup

For setting up your cloud build you will need to open up the cloud console:

  1. From the left hand menu select 'Container Registry' from 'Tools'.
  2. Select 'Build triggers'.
  3. Hit the 'Add trigger' button.
gcloud container builds submit --config cloudbuild.yaml