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

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

问题描述

我无法弄清楚如何从Cloud Source Control或GitHub直接自动部署新推送的云端函数提交。通过创建另一个函数和GitHub webhook,我找到了一个类似的解决方案,但由于函数不能SSH(并且安装了SSH密钥),它只能与Public Repos一起工作。 ( https://cloud.google.com/community/tutorials / cloud-functions-github-auto-deployer

任何想法如何实现?谢谢

解决方案

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



我做了一个快速示例: https://github.com/Philmod/auto-deploy-gcf



干杯,
Philmod


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

解决方案

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.

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

Cheers, Philmod

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

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