如何从Google Cloud Source Repository部署到GAE? [英] How do I deploy to GAE from the Google Cloud Source Repository?

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

问题描述

我正在考虑将我的php Google App Engine项目从Codenvy移到Google Source Repository,并在其中使用Source Editor对其进行编辑,但是我不知道如何使它部署我的项目.我该怎么办?

I'm considering moving my php Google App Engine project from Codenvy to the Google Source Repository and edit it there with the Source Editor, but I don't see how to cause it to deploy my project. How do I do that?

推荐答案

以下是通过猜测,试用,错误,

Here's what works for me, found through guesswork, trial, error, Billy and only a little docs.

我已将GC信息库设置为具有与之类似的信息库位桶,自动命名为default.注意:以下defaultgcloud可能无法识别通过 Rename 重命名的存储库.并且可以将不存在的存储库误用于空存储库.

I had set up GC Repositories to have a repository which is a mirror to bitbucket , auto-named default. Note: gcloud for default below can fail to recognise a repository that got that name by Rename. And can mistake a non-existent repository for an empty one.

更新:现在,在更新了位桶源之后,尽管部署成功",部署的应用也不显示更新]] 由于版本号.解决方法:使用配方2.

UPDATE: Now, after updating the bitbucket source, the deployed app does not show the update, despite "Deployment successful"]4. I don't know why - perhaps due to version number. Workaround: Use Recipe 2.

1确保项目的app.yaml文件包含application:version:,例如这个

1 Ensure project's app.yaml file contains application: and version: e.g. this

2转到 Google Cloud Patform 3单击Activate Google Cloud Shell http://i.imgur.com/Axjy17q.png

4在Google Cloud Shell中,输入:

4 In Google Cloud Shell, enter:

gcloud source repos clone default
appcfg.py update default
rm -rf default

这花费了大约20秒钟的部署时间和大约30秒钟的完成时间.

This took ~20s to deploy and ~30s to complete.

1确保项目的app.yaml文件包含application:version:(否则,您将得到

1 Ensure project's app.yaml file does not contain application: or version: (else you'll get an error like this) e.g. this

2转到 Google Cloud Patform 3单击激活Google Cloud Shell" http://i.imgur.com/Axjy17q.png

3 Click Activate Google Cloud Shell http://i.imgur.com/Axjy17q.png

4在Google Cloud Shell中输入:

4 In Google Cloud Shell enter:

gcloud source repos clone default
gcloud --quiet app deploy default/app.yaml
rm -rf default

警告:这可以保留以前的版本.

这大约需要65秒钟才能完成.

This took ~65s to complete.

重新计时,比较

Re timing, compare this, taking ~20s . Timings are for a Hello World project.

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

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