Commit f999d22c by Administrator

Update Jenkinsfile

parent ee5b3b18
Pipeline #90 failed with stage
in 3 seconds
node {
stage('SCM') {
git 'git@git.zhiweidata.top:root/print-demo.git'
}
stage('SonarQube analysis') {
withSonarQubeEnv('sonar') {
sh 'pwd'
sh '/usr/local/apache-maven-3.6.2/bin/mvn sonar:sonar'
pipeline {
agent any
stages {
stage('build && SonarQube analysis') {
steps {
withSonarQubeEnv('sonar') {
withMaven(maven:'maven') {
sh 'mvn clean package sonar:sonar'
}
}
}
}
stage("Quality Gate") {
steps {
timeout(1) {
waitForQualityGate abortPipeline: true
}
}
}
}
}
}
stage("Quality Gate"){
timeout(1) {
def qg = waitForQualityGate('sonar')
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