Maven deploy plugin - How to deploy multiple sharrdflows

Former Community Member
Not applicable

Hi,

I would like to deploy more than one shared flows that are in a Github repository, to Apigee, using maven deploy plugin.

This shows how to deploy a single shared flow as shown in this example:

https://github.com/apigee/apigee-deploy-maven-plugin/tree/master/samples/security-sharedflow/src/sha...

Can this tool deploy multiple Sharedflows and how do I have to organize the folder structure?

1 6 324
6 REPLIES 6

Yes - you should be able to do it using the Maven modules. Check this page for more info. They have a sample too. You can just follow the same concept with Apigee and deploy multiple sharedflows.

The only problem with this approach is when you have multiple sharedflows in your single repo, it will be tough for you to just deploy the sharedflow that you modified within that repo.

Former Community Member
Not applicable

Sai, Good point about deploying all sharedflows when only 1 sharedflow is updated when all the sharedflows are in a single repo.

Could you suggest a better way of organizing sharedflows in git to only deploy updated sharedflows.

Shared flow === Repo

The general recommendation is to have them as separate repo. So when you make a change to a single shared flow, the pipeline for that repo triggers and then deploys it to Apigee. With this its easy to manage, govern and audit changes

Former Community Member
Not applicable

In the case of shared flow == repo, would I have to create a jenkins job per repo?

no need.. You can sync the repo with Jenkins and have a Jenkinsfile in the repo, so with the change it will automatically trigger

Former Community Member
Not applicable

Thanks Sai. Could you share an example jenkinsfile if you already have one? That will save time for me. I am going to try one repo for each shared flow and one jenkins job that will publish sharedflow to apigee when any of the repos gets updated.