Hi There!
I am trying to set up a CI/CD pipeline for our Apigee API proxies.
Setup is like this:
Our pipeline is triggered on every push to master. I want to 'deploy' 4 times (we have 4 environments). We have two organisations: non-prod (with env1,env2,env3) and prod (with env4).
We automatically deploy into env1. We have an approval stage to move deploy to env2, idem for env3 and env4.
I am using the Apigeetool deployproxy script. I'm setting the org and env for every 'stage'.
So this works and deploys the proxy just fine, but it will always bump the revision number with 1 in the same organisations. So when we run through the whole pipeline, we get a revision structure like this (lets assume there is no exisiting version):
Organisation | Environment | Revision |
non-prod | env1 | 1 |
non-prod | env2 | 2 |
non-prod | env3 | 3 |
prod | env4 | 1 |
As you can imagine, this is not wanted behaviour, since env1, env2 and env3 are actually running identical versions.
I am aware of the scripts to get a list of revisions and deploy a certain revision number for an existing API, but these script are not pipeline friendly: it's very hard to pipe the output from one as input (because the list of deployed versions is returned as text with a few paragraphs -- not sure if matching with regex is an ideal solution).
What are possible solutions to get this result?
Organisation | Environment | Revision | |
non-prod | env1 | 1 | |
non-prod | env2 | 1 | |
non-prod | env3 | 1 | |
prod | env4 | 1 |
Hope one of you have encountered this issue and were able to overcome it!
Thanks in advance
Thomas