Jenkinsfile: Add ANSI color parsing for Linux unit testing/Docker image build.

This commit is contained in:
/dev/urandom 2016-10-03 22:27:24 +02:00
parent 4a8d5b0730
commit 3056e0639d
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

34
Jenkinsfile vendored
View File

@ -243,22 +243,24 @@ gitlabBuilds(builds: ["Checkout & Versioning", "Build", "Testing", "Archiving"])
} }
executions["$testName on Linux"] = { executions["$testName on Linux"] = {
node("docker && linux && amd64") { node("docker && linux && amd64") {
try { wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) {
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(test.StashName) image.inside {
} doUnitTests(test.StashName)
} catch (Exception e) { }
if (isUnix()) { } catch (Exception e) {
manager.buildUnstable() if (isUnix()) {
manager.addWarningBadge "$testName unit test failed on Linux" manager.buildUnstable()
} else { manager.addWarningBadge "$testName unit test failed on Linux"
throw e } else {
throw e
}
} }
} }
} }