Docker Image and Maven Options, Creating Local repository when the Docker container is created and copying settings.xml fileLocal Cache for the Gitlab Pipeline, we shall cache .m2/repository inside the container, so we can use this for further build processesGitLab CI Stages, here we define our CI stagesGitlab CI Build Stage, here we shall build AEM maven and package the artifactsDeploying to Artifacts Artifactory, these will be used later to deploy in different ENVArtifacts uploaded to Artifactory, since we are building SNAPSHOTS, we can find the artifacts at lib-snapshot-localDeploy 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

DEV build triggered once the change is pushed to DEV branchDEV build triggered once the change is pushed to DEV branchDEV Build complete and the .m2/repository is cached and will be available for the next stageUpload the Artifacts to ArtifactoryOUTPUT – Upload the Artifacts to Artifactory and the cache is created and the .m2/repository is available for next stageManual Deployment to ENV, Build is successful but CICD pipeline awaits manual trigger for installing the JAR and ZIP files to AEMTriggering the Deployment to IT ENVTriggering the Deployment to IT ENVScript to Trigger the DeploymentOUTPUT from Triggering the Deployment to IT ENV, artifacts successfully installed to AEM