问题描述
我无法弄清楚如何从Cloud Source Control或GitHub直接自动部署新推送的云端函数提交。通过创建另一个函数和GitHub webhook,我找到了一个类似的解决方案,但由于函数不能SSH(并且安装了SSH密钥),它只能与Public Repos一起工作。 ()
任何想法如何实现?谢谢
您可以使用Google Cloud Builder实现此目标。在存储库中创建一个触发器,触发的构建将新代码部署到Google Cloud Function。
我做了一个快速示例:
干杯,
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云端功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!