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() {
|
def getCheckResultFromBuild() {
|
||||||
switch(build.result) {
|
def resultString = build.result.toString()
|
||||||
case 'SUCCESS':
|
if (resultString == 'SUCCESS') {
|
||||||
return "SUCCESSFUL"
|
return "SUCCESSFUL"
|
||||||
case 'NOT_BUILT':
|
} else if (resultString == 'NOT_BUILT' || resultString == 'ABORTED') {
|
||||||
case 'ABORTED':
|
return "NOT_STARTED"
|
||||||
return "NOT_STARTED"
|
|
||||||
case 'FAILURE':
|
|
||||||
case 'UNSTABLE':
|
|
||||||
default:
|
|
||||||
return "FAILED"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remaining options: 'FAILURE' or 'UNSTABLE':
|
||||||
|
return "FAILED"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user