- Building an AEM multi-module project using AEM Maven Archetype.
- Placing the project under version control Git.
- Adding the project to GitLab.
- Modify the parent POM file to add distribution management [Artifactory].
- Modify the Maven settings file to include the Artifactory details.
- Create a YAML configuration file under the root of the project.
- Define CI pipeline stages and CD deployments in the YAML conf file.
- Upload the generated artifacts to Artifactory.
- Deliver the artifacts to various Environments [IT, UAT, Stage, Prod].
Step-01: Generate AEM Multi-Module Archetype Project
[code lang=bash]
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate \
-DarchetypeGroupId=com.adobe.granite.archetypes \
-DarchetypeArtifactId=aem-project-archetype \
-DarchetypeVersion=13 \
-DarchetypeCatalog=https://repo.adobe.com/nexus/content/groups/public/
[/code]
Step-02: Placing the Project Under Version Control
[code lang=bash]
$ git init
$ git add .
$ git commit -m “Initial Commit”
[/code]
Step-03: Create a Project on GitLab and add the existing project to GitLab
[code lang=bash]
$ git remote add origin git@glmavnprj.yebbare.com:root/kkmvnaem.git
$ git push -u origin master
[/code]

Pushing the changes from Local to DEV ENV
Step-04: Modify the parent POM file to add distribution management [Artifactory] and settings.xml to include credentials for Artifactory
Step-04: Modify the parent POM file to add distribution management [Artifactory] and settings.xml to include credentials for Artifactory

Artifactory Settings in Settings XML and POM XML files
Step-05: Create a YAML configuration file under the root of the project

Step-06: Define CI pipeline stages and CD deployments in the YAML conf file
Step-05: Create a YAML configuration file under the root of the project

Step-06: Define CI pipeline stages and CD deployments in the YAML conf file

Docker Image and Maven Options, Creating Local repository when the Docker container is created and copying settings.xml file

Local Cache for the Gitlab Pipeline, we shall cache .m2/repository inside the container, so we can use this for further build processes

GitLab CI Stages, here we define our CI stages

Gitlab CI Build Stage, here we shall build AEM maven and package the artifacts

Deploying to Artifacts Artifactory, these will be used later to deploy in different ENV

Artifacts uploaded to Artifactory, since we are building SNAPSHOTS, we can find the artifacts at lib-snapshot-local

Deploy Stage, where a SHELL script is triggered to fetch the latest build from Artifactory and deploy it the respective AEM ENV
Step-07: Automatic Triggering of CI-CD Pipeline
Step-07: Automatic Triggering of CI-CD Pipeline

DEV build triggered once the change is pushed to DEV branch

DEV build triggered once the change is pushed to DEV branch

DEV Build complete and the .m2/repository is cached and will be available for the next stage

Upload the Artifacts to Artifactory

OUTPUT – Upload the Artifacts to Artifactory and the cache is created and the .m2/repository is available for next stage

Manual Deployment to ENV, Build is successful but CICD pipeline awaits manual trigger for installing the JAR and ZIP files to AEM

Triggering the Deployment to IT ENV

Triggering the Deployment to IT ENV

Script to Trigger the Deployment

OUTPUT from Triggering the Deployment to IT ENV, artifacts successfully installed to AEM
Step-08: Verifying the package and Bundle installation on AEM
Step-08: Verifying the package and Bundle installation on AEM

Package Deployed to AEM, verifying package from the CRX package Manager

Bundle installation verified from the Felix web console
No comments:
Post a Comment
If you have any doubts or questions, please let us know.