CI/CD Script notes (CLONE+BUILD+CODE ANALYSIS)
pipeline {
agent any
environment {
PATH="${PATH}:/opt/maven/bin"
}
stages {
stage('CLONE') {
steps {
git branch: 'main', url: 'https://github.com/raghu4devops/vansro22.git'
}
}
stage('BUILD') {
steps {
sh 'mvn clean package'
}
}
stage('CODE ANALYSIS') {
steps {
withSonarQubeEnv('SonarQube-Server')
{
sh 'mvn sonar:sonar'
}
}
}
}
}
Comments
Post a Comment