Merge branch 'stable-2.16' into stable-3.0
* stable-2.16: Avoid use of switch on String for Checks API results Change-Id: Id22561af05dee10df371c56cc6f965932115c87d
This commit is contained in:
commit
ec52360df1
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@ -63,17 +63,15 @@ class GerritCheck {
|
||||
}
|
||||
|
||||
def getCheckResultFromBuild() {
|
||||
switch(build.result) {
|
||||
case 'SUCCESS':
|
||||
return "SUCCESSFUL"
|
||||
case 'NOT_BUILT':
|
||||
case 'ABORTED':
|
||||
return "NOT_STARTED"
|
||||
case 'FAILURE':
|
||||
case 'UNSTABLE':
|
||||
default:
|
||||
return "FAILED"
|
||||
def resultString = build.result.toString()
|
||||
if (resultString == 'SUCCESS') {
|
||||
return "SUCCESSFUL"
|
||||
} else if (resultString == 'NOT_BUILT' || resultString == 'ABORTED') {
|
||||
return "NOT_STARTED"
|
||||
}
|
||||
|
||||
// Remaining options: 'FAILURE' or 'UNSTABLE':
|
||||
return "FAILED"
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user