Level 2
August 29, 2024
Solved
Yaml file to create CICD pipeline for Adobe Cloud Manager
- August 29, 2024
- 1 reply
- 1435 views
I have written yaml file for create CI/CD pipeline by installing maven pkg , deploy to stage/production followed by checkout branch and push it to master .
But pl buddy check and need help if anything missing .As I need
1.Proper Yaml file to create CI/CD Pipeline
2. Include tools like git, maven, sonar,webpack,github actions
======
name: CI/CD pipeline for installing Maven Pkg
trigger:
batch: true
branches:
include:
- master
variables:
- name: remote_aem_git
git_url : https://<>.remote_aem.git
# Define the pipeline stages
stages:
- name: Checkout Branch
steps:
- name: Checkout branch
scripts:
git checkout -b feature/aem-kx
- name: Build and Test
steps:
- name: Build
# Build first AEM project
script: |
mvn clean install -P autoInstallPackage
# Run code quality checks
- name: Code Quality Check
script: |
mvn sonar:sonar
# Run unit tests
- name: Unit Tests
script: |
mvn test
# Deploy to the staging environment
- name: Deploy to Stage
steps:
- name: Deploy
script: |
mvn -P autoInstallPackage -D env=stage
# Run performance tests
- name: Performance Testing
steps:
- name: Performance Test
script: |
mvn -P performanceTest
# Deploy to the production environment
- name: Deploy to Production
steps:
- name: Deploy
script: |
mvn -P autoInstallPackage -D env=prod
- name: Push Changes
steps:
- name: Commit and push
# Add , commit and push changes
scripts:
git add .
git commit -m " new changes"
git push origin feature/aem-kx