This commit is contained in:
Bharatkumar5690 2023-03-09 18:35:33 +05:30
parent cf6c717a8c
commit ba820a6d8e

17
Jenkinsfile vendored
View file

@ -1,5 +1,6 @@
pipeline {
agent { label 'Master'}
triggers { pollSCM ('* * * * *') }
stages{
stage('vcs') {
steps {
@ -30,14 +31,7 @@ pipeline {
)
}
}
stage('Test the code by using sonarqube') {
steps {
withSonarQubeEnv('SONAR_CLOUD') {
sh 'mvn clean verify sonar:sonar -Dsonar.login=ea06c1ce5d1ee81e35db29d8cb0de69b42c70278 -Dsonar.organization=springpetclinic-1 -Dsonar.projectKey=springpetclinic-1_bha'
}
}
}
stage ('Exec Maven') {
stage ('package') {
steps {
rtMavenRun (
tool: 'MAVEN_DEFAULT',
@ -50,6 +44,13 @@ pipeline {
)
}
}
stage('Test the code by using sonarqube') {
steps {
withSonarQubeEnv('SONAR_CLOUD') {
sh 'mvn clean verify sonar:sonar -Dsonar.login=ea06c1ce5d1ee81e35db29d8cb0de69b42c70278 -Dsonar.organization=springpetclinic-1 -Dsonar.projectKey=springpetclinic-1_bha'
}
}
}
stage('Gathering the artifacts & test results') {
steps {
archiveArtifacts artifacts: '**/target/*.jar',