可以通过Container Registry中的新Docker映像来触发Google Cloud Build吗?
我正在使用Google的云工具设置CI / CD,并希望在将新图像上传到Container Registry时具有触发条件。
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".
用例将部署与源(仓库)分开。源将推送Docker映像,而部署会将它们部署到测试阶段。
The use case is separating deployment from source (repo). Source would push Docker images and deployment would deploy them to a test stage.
但是Cloud Build仅为我提供了三个源存储库之间的触发选择。 链接
But Cloud Build only provides me a trigger choice between three source repos. link
在GKE上下文中,您将如何对Docker映像进行测试,质量检查和生产部署?
What would you use for test, QA and production deployment of Docker images, in a GKE context?
正如大多数人可能知道的那样,GCR将其图像存储到存储桶中,然后可以编写一个每当存储桶中发生更改时就会触发的Cloud Function(请在文档此处)。
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).
然后,您的Cloud Function将通过调用Google Cloud SDK客户端或其余的 API 。
Your Cloud Function will then run the trigger by calling either the Google Cloud SDK client either the rest API.