Jenkinsfile: Fix unstable status handling code.

This commit is contained in:
/dev/urandom 2016-09-15 22:52:29 +02:00
parent 0c532c58f5
commit a1de01474e
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

36
Jenkinsfile vendored
View File

@ -192,28 +192,28 @@ gitlabBuilds(builds: ["Checkout & Versioning", "Build", "Testing", "Archiving"])
} }
executions["$configuration on Linux"] = { executions["$configuration on Linux"] = {
node("docker && linux && amd64") { node("docker && linux && amd64") {
def image = null try {
dir("src") { def image = null
checkout scm dir("src") {
image = docker.build("github.com/IW4x/iw4x-client-testing-wine32", "--rm --force-rm -f jenkins/wine32.Dockerfile jenkins") checkout scm
deleteDir() image = docker.build("github.com/IW4x/iw4x-client-testing-wine32", "--rm --force-rm -f jenkins/wine32.Dockerfile jenkins")
} deleteDir()
image.inside { }
doUnitTests("IW4x $configuration (unit tests)") image.inside {
doUnitTests("IW4x $configuration (unit tests)")
}
} catch (Exception e) {
if (isUnix()) {
manager.buildUnstable()
manager.addWarningBadge "$configuration unit test failed on Linux"
} else {
throw e
}
} }
} }
} }
} }
try { parallel executions
parallel executions
} catch (Exception e) {
if (isUnix()) {
manager.buildUnstable()
manager.addWarningBadge "Unit tests failed on Linux"
} else {
throw e
}
}
} }
} }