wanted to divide the AEM Maven Build and Deploy in Jenkins | Adobe Higher Education
Skip to main content
Level 3
August 24, 2017
Resuelto

wanted to divide the AEM Maven Build and Deploy in Jenkins

  • August 24, 2017
  • 5 respuestas
  • 3288 visualizaciones

Hi Team,

  I wanted to divide the build and deploy jobs in Jenkins for the AEM maven project. Is that something can be able to do?or what other options do I have?

Thanks In Advance.

Este tema ha sido cerrado para respuestas.
Mejor respuesta de Diego_Fontan

You should define one Maven profile per environment (dev, qa, uat, prod) and for each one of them, you have to define all steps required to build and deploy  (e.g: custom steps, ips configuration, etc) per environment.

The options are:

1) To create one job per environment and configure each of them (parameters, maven command, etc) depending on the environment selected, or

2) Have one job to build and deploy all environments, which implies to read all properties (environments and parameters per environments) and depending on the environment selected.

5 respuestas

Diego_Fontan
Level 4
August 25, 2017

First of all, there are many ways to resolve this.

For example,  you can do it like this

  1. define 2 differents maven profiles in your pom.xml file, one for build and another one for deploy.
  2. create 2 Jenkins jobs: one for build and another one for deploy.
  3. Configure build job with all maven command associated with build process (e.g: mvn clean install -PbuildApp -PbuildBundle1)
  4. Configure deploy job  with all maven command associated with deploy process (e.g: mvn clean install -Pdeploy)
  5. you can connect build and deploy job, connecting via Jenkins, it means at the moment build's job complete successfully trigger deploy's job. 

Please note few things

  • jenkins plugins and global config must be corrected set up to ensure build and deploy successfully.
  • make sure all ip's belong into the whitelist.

Let me know if you need more details to resolve this

smacdonald2008
Level 10
August 25, 2017

What is the reason for this. Using Maven, you can build and compile projects.

Level 3
August 25, 2017

Hi Diego, Thanks for the info. Let me try that way. I am very new to setting up Jenkin jobs. This is my first time doing.

I will follow this way. Thanks

Level 3
August 25, 2017

Hi Scott,

     For the DEV integration environment we wanted to build and deploy in one shot but for other environments say QA, UAT, and Prod we don't want to build the same code we wanted to deploy the DEV build to all these environments.  That is the only main reason.

Thanks

Uma

Diego_Fontan
Diego_FontanRespuesta
Level 4
August 25, 2017

You should define one Maven profile per environment (dev, qa, uat, prod) and for each one of them, you have to define all steps required to build and deploy  (e.g: custom steps, ips configuration, etc) per environment.

The options are:

1) To create one job per environment and configure each of them (parameters, maven command, etc) depending on the environment selected, or

2) Have one job to build and deploy all environments, which implies to read all properties (environments and parameters per environments) and depending on the environment selected.