mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 14:05:50 +00:00
Updated to use trial version of the new DSL plugin.
This commit is contained in:
parent
6be06388a1
commit
68b17bad46
1 changed files with 10 additions and 7 deletions
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
|
@ -1,7 +1,4 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
//environment {
|
|
||||||
//}
|
|
||||||
|
|
||||||
tools {
|
tools {
|
||||||
maven 'Maven 3.5.0'
|
maven 'Maven 3.5.0'
|
||||||
}
|
}
|
||||||
|
@ -15,8 +12,9 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('SonarQube analysis') {
|
stage('SonarQube Analysis') {
|
||||||
steps {
|
steps {
|
||||||
|
/*
|
||||||
script {
|
script {
|
||||||
scannerHome = tool 'SonarQube_Scanner_3.0.3.778';
|
scannerHome = tool 'SonarQube_Scanner_3.0.3.778';
|
||||||
}
|
}
|
||||||
|
@ -25,6 +23,11 @@ pipeline {
|
||||||
echo "${scannerHome}"
|
echo "${scannerHome}"
|
||||||
sh "${scannerHome}/bin/sonar-scanner"
|
sh "${scannerHome}/bin/sonar-scanner"
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
sonarqubeAnalysis {
|
||||||
|
scanner = 'SonarQube_Scanner_3.0.3.778',
|
||||||
|
server = 'Staging'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,15 +36,15 @@ pipeline {
|
||||||
timeout(time: 1, unit: 'HOURS') {
|
timeout(time: 1, unit: 'HOURS') {
|
||||||
script {
|
script {
|
||||||
// these are the statuses that we'll allow
|
// these are the statuses that we'll allow
|
||||||
def allowableQualityGateStatuses = ['OK','WARN']
|
def allowableQualityGateStatuses = ['OK', 'WARN']
|
||||||
|
|
||||||
// we need to wait for the quality check to complete
|
// we need to wait for the quality check to complete
|
||||||
def qualityGate = waitForQualityGate()
|
def qualityGate = waitForQualityGate()
|
||||||
|
|
||||||
// if the status we got back, isn't one of the logal ones, then
|
// if the status we got back, isn't one of the logal ones, then
|
||||||
// we need o fail the build
|
// we need to fail the build
|
||||||
if (!allowableQualityGateStatuses.contains(qualityGate.status)) {
|
if (!allowableQualityGateStatuses.contains(qualityGate.status)) {
|
||||||
error "Pipeline aborted due to quality gate failure: ${qg.status}"
|
error "Pipeline aborted due to quality gate failure: ${qualityGate.status}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue