从 Google Cloud Source Control 自动部署 Google Cloud Functions [英] Auto deploy Google Cloud Functions from Google Cloud Source Control

查看:32
本文介绍了从 Google Cloud Source Control 自动部署 Google Cloud Functions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何从 Cloud Source Control 或直接从 GitHub 自动部署新推送的 Cloud Functions 提交.我通过创建另一个函数和 GitHub webhook 找到了一个类似的解决方案,但是由于 Functions 不能 SSH(并且安装了 SSH 密钥),它只能与公共存储库一起使用.(https://cloud.google.com/community/tutorials/云函数-github-auto-deployer)

I can't figure out how to automatically deploy newly pushed commits of Cloud Functions either from Cloud Source Control or from GitHub directly. I have found a similar solution by creating another function and GitHub webhook, but since Functions can't SSH (and have SSH keys installed), it is only working with Public Repos. (https://cloud.google.com/community/tutorials/cloud-functions-github-auto-deployer)

任何想法如何实现这一目标?谢谢

Any ideas how to achieve this? Thanks

推荐答案

您可以使用 Google Cloud Builder 来实现此目标.在您的代码库上创建一个触发器,触发的构建会将新代码部署到 Google Cloud Function.

You could use Google Cloud Builder to achieve this goal. Create a trigger on your repository, and the triggered build deploys the new code to Google Cloud Function.

我举了一个简单的例子:https://github.com/Philmod/auto-deploy-gcf

I made a quick example: https://github.com/Philmod/auto-deploy-gcf

干杯,菲尔莫德

这篇关于从 Google Cloud Source Control 自动部署 Google Cloud Functions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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