通过GitHub存储库部署到Google App Engine [英] Deploy to Google App Engine via a GitHub Repo
问题描述
我正在学习如何使用Google App Engine,可以通过终端进行很好的部署,但是我想允许人们为我的github回购贡献力量,他们发布的任何内容都会更新我的应用.这是我的仓库:
https://github.com/rajtastic/roshanissuperveryawesome
我已将存储库同步到应用程序引擎,并且可以在我的Cloud实例中看到内容
我的问题是:
- 每当我提交回购协议时,如何部署应用程序的新版本?
有人知道这是否可能吗?
现在似乎已弃用原始的一键部署"功能,但是您可以使用Google Cloud Platform的构建触发器来执行此操作:
导航到Google Cloud Platform>容器注册表构建触发器并设置要从连接的github存储库中自动构建的分支.
确保已将构建定义添加到存储库. 在这里,您可以找到完整的规范,但这是通过cloudbuild.yaml
进行gcloud deploy
的最低要求的示例:
steps:
- name: 'gcr.io/cloud-builders/gcloud'
args: ['app', 'deploy']
I'm learning how to use Google App Engine and I can deploy fine via terminal but I want to allow people to contribute to my github repo and anything they publish will update my app. Here is my repo:
https://github.com/rajtastic/roshanissuperveryawesome
I've sync'd my repo to app engine and I can see the contents in my Cloud instance
My question is:
- How do I deploy a new version of my app whenever I commit to my repo?
Does anyone know if this is possible?
Looks like the original push-to-deploy feature is now deprecated, but you can use Google Cloud Platform's Build Trigger to do this:
Navigate to Google Cloud Platform > Container Registry > Build Triggers and set up the branch(es) you want to auto build from your connected github repository.
Make sure you've added a build definition to your repository. Here you can find the full specification, but here's an example of the bare minimum to do a gcloud deploy
via cloudbuild.yaml
:
steps:
- name: 'gcr.io/cloud-builders/gcloud'
args: ['app', 'deploy']
这篇关于通过GitHub存储库部署到Google App Engine的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!