Use the CI/CD Pipeline in Adobe Cloud Manager
Adobe Cloud Manager provides a simple, yet flexible self-service CI/CD Pipeline that allows AEM project teams to quickly, safely and consistently deploy code to all AEM environments hosted in AMS. This video series explores setting up and executing Cloud Manager’s CI/CD Pipeline in both failure and success scenarios.
Introduction
A cursory introduction to Cloud Manager and Cloud Manager Programs.
Setting up the CI/CD pipeline
This video explores setting up the Pipeline for the Program in Cloud Manager.
A failing pipeline execution
This video explores the execution of the CI/CD Pipeline using code that fails Cloud Manager’s required quality checks, using the yellow repository branch.
A successful pipeline execution
This video explores the successful execution of the CI/CD Pipeline using code that passes Cloud Manager’s required quality checks, using the master repository branch.
This video also touches on the Activity console in Cloud Manager, which allows re-entrance into active executions, or review of completed or failed executions.
So let’s see what a successful build looks like. For this, we’ll head back to the overview and configure the pipeline settings to pull from the master branch.
Let’s deploy again.
And we can see our build and unit tests have passed, as well as the previously failing code scans. Because all the quality checks had passed, the code has been automatically deployed to stage. Let’s take a peek at the deployment logs.
These include information about how Cloud Manager has automatically backed up the IAM instance, detached the IAM instance from the load balancer, ensuring the IAM instance doesn’t accept traffic during deployment, deploying the application packages, and finally reattaching to IAM instance to the load balancer so it can resume accepting traffic. Note that this will perform a rolling deployment across all AEM instances in the stage environment.
The next step in our pipeline is pre-production testing which involves security and load testing against the stage environment. In our example, we see there’s an issue with security testing so we can review this. Luckily it looks like all critical or mandatory tests have passed, but there’s one failing test under Important. Because this failure is not critical, we have the option to override and continue with the deployment. Optionally, we could reject to the deployment and resolve this failure. But for this example, we’ll override so we can continue. Next are the performance tests which we configured in the pipeline settings. We configured this to evenly distribute the test traffic across live popular pages, live other pages or pages that didn’t make it into the popular cut, and new pages that exist on stage but not in production. The popular live pages are automatically derived by Cloud Manager, looking at real traffic pattern to the production IAM environment. This test runs for 30 minutes, so I’ll speed it up for the video.
All right, so we partially passed our performance testing, so let’s review the results.
We’ll see the usual critical, important breakouts with the critical test passing. There’s one failure under Important which tells us that we missed our target threshold of 200 pages per minute as we only obtain 174. Remember this 200 page views per minute is a configuration at the program level. Let’s override this failure and say that 174 is sufficient. At this point, the release has passed all of the automated tests and ready for any required user acceptance testing. Once the user acceptance testing on stage is completed, the release can be approved for production deployment. Note that when the deployment to production happens, Cloud Manager uses the exact artifacts deployed to stage and does not recompile from the git branch. This guarantees consistency in the release between all environments. Let’s continue our release and continue our path to production. If in our pipeline settings we had selected CSE support, the pipeline would notify the program CSE and pause for their involvement. Since we didn’t, the artifacts are deployed to production in the same rolling fashion as was done to stage.
So, each IAM instance in the production environment is backed up, taken out of the load balancer. The packages are deployed and finally the IAM instance is put back in the load balancer and resumed serving traffic. So, as you just saw, Cloud Manager makes getting code from source control into IAM environments safely and quickly easier than ever with minimal setup. So, before we end, let’s head up to the activity tab at the top. During this video, we ran through and promoted our code fairly quickly and it’s reasonable to imagine that the deployment manager may need to step away from their computer or have accidentally closed their browser tab during this process. All executions of the pipeline for the program are logged under the Activities tab so we can always see any active pipeline executions, as well as success and failures. We can always click into these to resume executing or review and collect the feedback and logs from finished executions. -
Supporting materials
- Cloud Manager User Guide
- Download code scanning SonarQube rules
- XLSX available at the bottom of the linked section
- SonarQube Java™ rules index