可以通过Container Registry中的新Docker映像来触发Google Cloud Build吗? [英] Can Google Cloud Build be triggered by new Docker image in Container Registry?

查看:95
本文介绍了可以通过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.

这篇关于可以通过Container Registry中的新Docker映像来触发Google Cloud Build吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆