Deploy proxy bundle using apigee deploy maven plugin in azure devops

I have a CI/CD pipeline in Azure DevOps where in the build pipeline I get the final proxy bundle exported using the Edge management API and stored as an artifact in a repo.

Then I use it in the Release pipeline to deploy it to the first environment. I tried to use the apigeetool to deploy the bundle, which deploys it as a new revision. But I need the latest revision on edge to be deployed, which is what I have in the artifact already.

Since earlier I was using the Edge management API, i didn't have an issue with the deployment

I have figured that the apigee deploy maven plugin can solve this issue of deploying the same revision.

Please note, i am deriving the proxyname from the swagger spec, and getting the latest revision of this proxy using scripts and exporting it out into a repo.

Also, at a later point, will be using this extracted artifact to deploy to different environments. Based on the branching -merging strategy posts on the community, I will go with different branches for different environments but I need to ensure code traceability and possibility of deploying the same revision to different environments as well.

My question is can I achieve the above with the apigee deploy maven plugin?

0 5 701
5 REPLIES 5

@Nagashree B, @Sai Saran Vaidyanathan Could you please help with this query..

@Aishwarya Kozhisherry

If I understand your problem statement right - You want to deploy the api proxy to your environment with a particular revision# instead of the default behavior - which increments it as current revision+1

Have you tried using (I haven't tried these, but its listed in the plugin readme, under Advanced Configurations)

apigee.options=update and apigee.revision parameters

With Apigeetool also you deploy a specific revision, check deployExistingRevision option in apigeetool if that works for your usecase.

@Nagashree B Thanks for your response. Yes I checked the deployExistingRevision on apigeetool, but it looks like it is not supported by the tool currently.

Using the apigee-deploy-maven-plugin I could use those options, but am stuck with different issues while using the plugin.

If apigeetool could deploy the existing revision, I think it would resolve my main issue for sure.

I am not sure which version you are using, I had no issues with deployExistingRevision using apigeetool.

This was my commandline

cd to the folder that contains the apiproxy code (the "apiproxy" folder)

C:\temp\hotels>apigeetool deployExistingRevision  -u xxx -p xxx -o xxx -e dev -n hotelsapi -L http://xxxxx.com:80808 -r 2
"hotelsapi" Revision 2
  deployed
  environment = dev
  base path = /
  URI = http://xxxx.com:9001/hotelsapi

Here is what I would suggest. Try to run the apigeetool from commandline on your local and check if you get the right response. Once you get this right, you can then add the same to a commandline task in your Azure devops CD pipeline.

apigee-deploy-specific-revision.jpg

@Nagashree B

Thanks for the response. I tried your suggestion and I was able to fix this. Am able to use the apigeetool now for deploying. Thanks again.