How to deploy an already existing revision through Maven

Hi,

My question is similar to https://community.apigee.com/questions/45905/how-to-deploy-the-existing-revision-using-maven-co.html , but I had some questions related to the answer that was mentioned. So let me make it more clear here.

I have a scenario where I have deployed a new revision using maven install and no options. A new revision (revision 2) is created and deployed. After deployment I run some tests and tests are failing so I want to delete the newly deployed revision(revision 2) and deploy the previous revision (revision 1) using maven commands.

I tried to use -Doption=clean which cleaned up the newly deployed revision(revision 2) which failed the tests, but how to deploy the current revision(revision 1) which was already deployed.

I have also tried -Doption=update as mentioned in the previous question, but it deployed the new code as revision 1 itself, but did not roll back as I required.

@SURESHT @Sai Saran Vaidyanathan @Anil Sagar

0 2 418
2 REPLIES 2

HI @Prathip

What ever you mentioned is correct, if you use the update option it bundles your code and pushes it on the same revision. This is purposely done as you never know if the previous revision is the correct revision. It is quite possible that in dev, I may have multiple revisions and the previous revision is not stable as I am making changes. If you want that, you can make use of the Management API

@Prathip

Did you find out how to deploy the previous revision after clean?