Can Google Cloud Build be triggered by new Docker image in Container Registry?

12/12/2018

I'm setting up a CI/CD using Google's cloud tools, and was expecting to have a trigger condition "when new image is uploaded to Container Registry".

The use case is separating deployment from source (repo). Source would push Docker images and deployment would deploy them to a test stage.

But Cloud Build only provides me a trigger choice between three source repos. link

What would you use for test, QA and production deployment of Docker images, in a GKE context?

-- akauppi
deployment
google-cloud-build
google-cloud-platform
google-kubernetes-engine

1 Answer

1/28/2019

Meanwhile, there is a solution but it's a lillte cumbersome.

As most of you probably know, GCR stores its images into a Bucket, it is possible then to write a Cloud Function that is triggered whenever a changes occurs in the Bucket (look at the documentation here).

Your Cloud Function will then run the trigger by calling either the Google Cloud SDK client either the rest API.

-- Mohamed Abdennebi
Source: StackOverflow