Expand my Community achievements bar.

SOLVED

[Maven]Process to deploy code onto various environments

Avatar

Level 9

Hi All,

We are various and want to deploy code onto different environments like DEV,INTEGRATION,TEST and PROD.And we are using Maven to build all custom code.

How can we maintain configuration specific and author/publisher details specific to environment?

Please help  me in this regard.

Thanks,

Kishore

1 Accepted Solution

Avatar

Correct answer by
Level 2

Kishore,

the easiest way is to explore the idea that was given in previous answer - run modes. This allows you basically to have one single package with configs and deploy it to all your environments. Basically you create folders with osgi config with proper names. Those names are then picked up by AEM, and it selectively applies only configs that belong to this environment (based on runmode). Please explore information given here:

https://docs.adobe.com/docs/en/cq/5-6-1/deploying/configure_runmodes.html

It covers both how to assign runmodes to your instance, as well as has a link explaining how to create osgi configs based on runmodes.

Your second option is to have seperate config packages for each environment and then have seperate process (CI job?) for each environment. This approach is not recommended though as it's much harder to maintain in longer term.

View solution in original post

3 Replies

Avatar

Community Advisor

I guess you are looking for deploying the bundles to different environment via Maven

Refer the following URL - http://www.albinsblog.com/2015/06/deploying-bundlespackages-to-different-env-maven-adobecq5-adobeaem...

Avatar

Correct answer by
Level 2

Kishore,

the easiest way is to explore the idea that was given in previous answer - run modes. This allows you basically to have one single package with configs and deploy it to all your environments. Basically you create folders with osgi config with proper names. Those names are then picked up by AEM, and it selectively applies only configs that belong to this environment (based on runmode). Please explore information given here:

https://docs.adobe.com/docs/en/cq/5-6-1/deploying/configure_runmodes.html

It covers both how to assign runmodes to your instance, as well as has a link explaining how to create osgi configs based on runmodes.

Your second option is to have seperate config packages for each environment and then have seperate process (CI job?) for each environment. This approach is not recommended though as it's much harder to maintain in longer term.