简体   繁体   中英

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

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.

It looks like the underlying function we need is this: 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.

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.

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?

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.

As you already know a good way of achieving your technical purpose would be using the gcloud app services set-traffic command.

Another way which you may take into consideration would be using the Admin API . The Admin API is a RESTful API which can be used with any programming language to manage your App Engine applications.

And if you want you can take a look over Jenkins for Google Cloud . I think it might help you in your CI process.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM