Deploy existing proxy revision using maven plugin

Not applicable

Is it possible to just deploy the existing proxy revision using maven deploy plugin?

This is required for CI/CD implementation. We have two environments stage and prod. First we will deploy to stage using maven install. After verification in stage we need to deploy same proxy revision (latest revision) to prod (without importing creating a new revision). I tried mvn apigee-enterprise:deploy comamnd but didn't work.

0 5 823
5 REPLIES 5

This is specific requirement. Deploying same revision to two different environment. For example below command deploys proxy to stage environment. Let's say it created a new revision called Revision 2

mvn install -P stage -Dusername=<userid> -Dpassword=<password>-Dorg=<org> -f shared-pom.xml -Dapigee.config.options=update

Now I want to deploy same revision (Revision 2) to prod environment without creating a new revision - Revision 3 using maven command.

HI @Sujnana Rai - Please see my answer to a similar post

Thanks. This means the current plugin doesn't support deploying same revision to two different environment. Only the option is management API. Let me explain why we need to deploy same revision.

We have multiple organizations - production and nonprod. Both are different Apigee instances (private cloud). In nonprod we have multiple environments - dev, qa and uat. Similarly we have two environments in production organization - stage and prod.

We start development by creating proxy in dev environment on nonprod organization. Once development is complete same revision is promoted to qa & uat. Once qa and UAT testing complete, the proxy will be promoted to stage environment (with new revision as new organization) of production organization. After successful verification on stage the same revision is deployed to prod environment.

If any issues or changes required then we start by creating new revision & deploying it to dev environment. The same process will be followed to promote changes to production. Hence, we need to deploy same revision to different environment.

Thanks for explaining your SDLC

However, the best practice is to control this using your Source Code Mgmt tool (Git or whatever you use tightly aligned to your branches). With this its completely controlled and audited and you know how to roll back. The best practice is to use different revisions for each environment at least for UAT so that you can control changes.

With the approach you just said, how will you do parallel development, lets say your UAT is going on for certain time and in the interim, you want to start a new enhancement for dev. Then you create a new revision right ? I am asking you to follow the same concept but driven by your source code. Here, for the new enhancement you will create a new branch and using that you deploy to dev and test. The UAT is still pointing to the old branch as its not complete.

You need to control the code promotion through your SCM (branching) and of course orchestrated by CI. Check out various posts on branching strategies that are available in this community for more info.

Going back to your question - the plugin cannot do what you asked and is not built for that purpose since the best practice is always to build it from SCM.