[英]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.