Version:
8.1
Problem:
I am trying to find a way to check quality gates via a maven/shell command.
I am reading about the api/qualitygates/project_status API. But was trying to find a shorter way to do it which is equivalent to the Jenkinsfile call:
stage("Quality Gate"){
steps {
timeout(time: 5, unit: 'MINUTES') {
// Parameter indicates whether to set pipeline to UNSTABLE if Quality Gate fails
// true = set pipeline to UNSTABLE, false = don't
waitForQualityGate abortPipeline: true
}
}
}