Commit f999d22c by Administrator

Update Jenkinsfile

parent ee5b3b18
Pipeline #90 failed with stage
in 3 seconds
node { pipeline {
stage('SCM') { agent any
git 'git@git.zhiweidata.top:root/print-demo.git' stages {
} stage('build && SonarQube analysis') {
stage('SonarQube analysis') { steps {
withSonarQubeEnv('sonar') { withSonarQubeEnv('sonar') {
sh 'pwd' withMaven(maven:'maven') {
sh '/usr/local/apache-maven-3.6.2/bin/mvn sonar:sonar' sh 'mvn clean package sonar:sonar'
} }
} }
} }
}
stage("Quality Gate"){ stage("Quality Gate") {
steps {
timeout(1) { timeout(1) {
def qg = waitForQualityGate('sonar') waitForQualityGate abortPipeline: true
if (qg.status != 'OK') { }
error "Pipeline aborted due to quality gate failure: ${qg.status}" }
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment