We have client requirement for CI/CD pipeline . Rather than Full stack code available on Adobe we looking for traditional CI/CD pipelines which can be reused as and when required and can add our requirements if needed in the pipeline .
Am looking for sample CI/CD code for adobe expereince manager as well as for adobe commerce cloud .
Below is the code composed by referring some pointers (best practises) from basics CI/CD pointers . Just want to understand if this is enough to use the pipeline or do I need to add anything more to pipeline
======
#1.Separate stage for each task -
#2.Automate code quality checks - Use tools like sonarcube to ensure code quality
#3.Performance Testing - Incorporate PT to ensure the AEM apps meets performance benchmark
#4.Security scanning - Used to identify and mitigate security vulnerabilities
#5.Envt Variables - manage sensitive information
#6.Manual Approval - For critical deployment , add manual approval steps to ensure through review before prod deployment
name: CI/CD pipeline for Adobe Expereince Manager Cloud
on:
push:
branches:
- main
#Define the pipeline stages
stages:
- build
- code_quality
- performance_testing
- security_testing
- deploy
variables:
#Non production pipelines
AEM_ENV: 'Dev' 'QA'
build:
stage: build
script:
- echo "Building the AEM Application"
- mvn clean install -P autoinstallPackage
code_quality:
stage: code_quality
script:
- echo "Running code quality checks"
- mvn sonar:sonar
performance_testing:
stage: performance_testing
script:
- echo "Running performance testing"
- mvn test
security_testing:
stage: security_testing
script:
- echo "Running security tests"
- mvn dependency-check:check
deploy:
stage: deploy to Dev env
script:
- echo "Deploying to AEM"
- mvn -P autoInstallPackage -D env=Dev
enviornment:
name: Dev
url : https://<aem-dev-url.com>
only:
- main