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

[亡魂溺海] 提交于 2019-12-12 09:49:54

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/53748538/can-google-cloud-build-be-triggered-by-new-docker-image-in-container-registry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!