Hi there,

I am looking for a best (and/or correct) way to avoid duplication of cargo declarations when using multiple servers, but same set of applications. Only thing that changes is destination server and it's password.

Current scenario

One master pom, lot of modules. Web applications scattered in the hierarchy depending upon some criterion such as internal/external
Multiple branches
One jenkins build per branch.
One deployer module for deploying all the web applications. This was done so that all deployment information is defined only at one location. Jenkins build has cargo deploy command set with profile information to deploy to right server with right password.


So far this worked for us as we had only one target server for each profile/branch. Each profile defines it's own target server and everyone was happy.

Now we have additional requirement where we need to deploy web applications two or more servers for certain profiles only. I am looking for a best way where I can minimize the duplication and still deploy to variable number of servers as part of jenkins build. Ideal way for me is to define deployment definition only at one location and set the deployment parameters using profiles. In short I am looking for something where I can call cargo deployer like a function and use same settings except destination urls and passwords which are defined by the profile.


I am considering following - not sure if any of these will work

1. Set jenkins build to use two profiles which define it's own target servers. 2. Somehow call another maven project and pass the destination information as parameter
3. Call shell script that will deploy to destination server

My choices might be worst and hence looking for best practices to achieve what I want to do. As I said I am trying to avoid profile specific duplication of cargo except the things that really need to be separate.

Thanks,

Niranjan



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to