Hi ,
I want to deploy multiple proxies revision in one jenkins job. is it possible?
I am following below structure;
Main repo
- Proxy1
pom.xml
shared-pom.xml
- Proxy2
pom.xml
shared-pom.xml
- parent-pom.xml
If someone can share hierarchical pom.xml files example, that would be really helpful.
Thank you!
Yes it is possible. And exactly in the way you described.
You will basically define a child maven module per proxy and have an aggregate pom (the one you call parent-pom)
Your aggregator pom will have a section like
<modules> <module>proxy-1-artifactId</module> <module>proxy-2-artifactId</module> </modules>
When your Jenkins Job clones the project and runs the apigee packaging and deployment goals, maven in turn would propagate those goals to each module included in the aggregator.
It just works.
You can then define the apigee maven plugin configuration in an actual parent pom (referred in <parent> of child module pom.xml) . This saves you from redundantly defining plugin configuration in each child pom.
Having said all that, i would recommend that you do not use a single job run to batch deploy multiple proxies. Imagine the scenario where your job tried to deploy 3 proxies,
IMHO, each job run should link to one deployment attempt. You can reuse the same job to deploy multiple proxies though (but not in the same job run). If you need the convenience of a one click - deploy multiple proxies , look for automating on top of Jenkins using custom scripts/job chaining/pipelines.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |