apigee-deploy-maven-plugin v2.4.0 now supports a new goal to promote proxies within an Apigee organization
NOTE: This is only for Apigee X/hybrid
The plugin always offered packaging the source code and deploying the bundle to a target environment. Many customers were asking if there was a way to just promote an existing revision to a target environment using the plugin. With the promote goal, now one should be able to build their pipeline easily to build, deploy and promote the proxies depending on their SDLC processes
The promote goal allows the following options:
- To deploy the latest revision to a target environment:
mvn apigee-enterprise:promote -P${profile} -Dbearer=$(gcloud auth print-access-token)
For example let’s say the latest revision number of a proxy is 5 (whether deployed or not), the above command will deploy that revision to the environment configured in the Maven profile
- To deploy a specific revision to Target env:
mvn apigee-enterprise:promote -P${profile} -Dbearer=$(gcloud auth print-access-token) -Dapigee.promote.revision=${REV}
For example, let’s say you want a specific revision (Revision 3) to be deployed to an environment, you just need to pass -Dapigee.promote.revision=3. The plugin will deploy that revision to the environment configured in the Maven profile
- To deploy a revision from a source env to a Target env:
mvn apigee-enterprise:promote -P${profile} -Dbearer=$(gcloud auth print-access-token) -Dapigee.promote.sourceEnv=${SOURCE_ENV}
For example, lets say Revision 6 is deployed to dev environment and you want to promote that revision to qa environment. You can just pass -Dapigee.promote.sourceEnv=dev. The plugin will find the deployed revision from the source environment and deploy that revision to the environment configured in the Maven profile
You can find this info on the plugin README as well
Try this feature in your pipeline and let us know. If you have issues, feel free to open a GitHub Issue