简体   繁体   English

您如何使用新的Google App Engine Maven插件升级已部署的版本?

[英]How do you promote a deployed version with the new Google App Engine Maven plugin?

We've switched to using the new Cloud ADK based Maven plugin for App Engine described here: https://cloud.google.com/appengine/docs/standard/java/tools/migrate-maven 我们已切换为使用适用于App Engine的基于Cloud ADK的新Maven插件,如下所述: https : //cloud.google.com/appengine/docs/standard/java/tools/migrate-maven

All works fine, but there's one use case I wasn't able to see a way to do. 一切正常,但是有一个用例我看不到有办法。

In our CI we build and deploy the version, then after an approval step, we migrate traffic to it. 在我们的CI中,我们构建并部署版本,然后在批准步骤之后,将流量迁移到该版本。

It looks like the underlying function we need is this: https://cloud.google.com/sdk/gcloud/reference/app/services/set-traffic 看起来我们需要的基本功能是这样的: https : //cloud.google.com/sdk/gcloud/reference/app/services/set-traffic

But in the Maven plugin I only saw and option to do a full deploy with promote being true or false. 但是在Maven插件中,我仅看到和选择进行完全部署,提升为true或false。

The workaround we're using is to just re-deploy with promote=true , but that feels wasteful, when all we need to do is promote the already deployed version once it's approved. 我们正在使用的解决方法是仅使用promote=true重新部署,但是这很浪费,当我们需要做的就是在批准已部署的版本时对其进行升级。

My question is, is there a way to do this with the new Maven plugin, or do we switch to the gcloud CLI tool for this sort of thing? 我的问题是,有没有办法使用新的Maven插件来执行此操作,还是我们需要切换到gcloud CLI工具进行此类操作?

As I looked over all the parameters I would think that there is no way to achieve what you wanted only by using the Maven plugin. 当我查看所有参数时,我会认为仅使用Maven插件就无法实现所需的功能。

As you already know a good way of achieving your technical purpose would be using the gcloud app services set-traffic command. 如您所知,达到技术目标的一种好方法是使用gcloud app services set-traffic命令。

Another way which you may take into consideration would be using the Admin API . 您可能要考虑的另一种方法是使用Admin API The Admin API is a RESTful API which can be used with any programming language to manage your App Engine applications. Admin API是RESTful API,可与任何编程语言一起使用来管理您的App Engine应用程序。

And if you want you can take a look over Jenkins for Google Cloud . 并且,如果您愿意,可以看看Jenkins for Google Cloud I think it might help you in your CI process. 我认为这可能会对您的CI流程有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Google App Engine 中添加 --promote? - How do I add --promote in Google App Engine? 谷歌应用引擎:maven或eclipse谷歌插件 - Google app engine: maven or eclipse google plugin 如何为我在Google App Engine上部署的应用程序的Chrome插件绑定插件令牌 - How can I bind plugin token with my chrome plugin for the application deployed on Google App Engine Maven 3.1.0打破了Google App Engine Maven插件 - Maven 3.1.0 breaks Google App Engine Maven Plugin Google App Engine:部署版本中与过滤器相关的NoClassDefFoundError - Google App Engine: Filter-related NoClassDefFoundError in Deployed Version 如果您安装了Eclipse的Google插件,是否还需要下载App Engine Java SDK? - If you install the Google Plugin for Eclipse, do you still need to download the App Engine Java SDK? 为什么我无法同时使用Maven插件和Google App Engine插件在Intellij中创建新的Java项目? - Why am I unable to create a new Java project in Intellij using both the Maven Plugin and the Google App Engine Plugin? 如何在使用GAE Maven插件时在IDEA中调试Java Google App Engine应用程序? - How can I debug a Java Google App Engine app in IDEA while using the GAE Maven plugin? Google App Engine-您如何处理DatastoreTimeoutException? - Google App Engine - how do you handle a DatastoreTimeoutException? 如何保持Google App Engine的运行实例 - How do you keep a running instance for Google App Engine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM