Jenkinsfile: Add ANSI color parsing for Linux unit testing/Docker image build.
This commit is contained in:
parent
4a8d5b0730
commit
3056e0639d
34
Jenkinsfile
vendored
34
Jenkinsfile
vendored
@ -243,22 +243,24 @@ gitlabBuilds(builds: ["Checkout & Versioning", "Build", "Testing", "Archiving"])
|
||||
}
|
||||
executions["$testName on Linux"] = {
|
||||
node("docker && linux && amd64") {
|
||||
try {
|
||||
def image = null
|
||||
dir("src") {
|
||||
checkout scm
|
||||
image = docker.build("github.com/IW4x/iw4x-client-testing-wine32", "--rm --force-rm -f jenkins/wine32.Dockerfile jenkins")
|
||||
deleteDir()
|
||||
}
|
||||
image.inside {
|
||||
doUnitTests(test.StashName)
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (isUnix()) {
|
||||
manager.buildUnstable()
|
||||
manager.addWarningBadge "$testName unit test failed on Linux"
|
||||
} else {
|
||||
throw e
|
||||
wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) {
|
||||
try {
|
||||
def image = null
|
||||
dir("src") {
|
||||
checkout scm
|
||||
image = docker.build("github.com/IW4x/iw4x-client-testing-wine32", "--rm --force-rm -f jenkins/wine32.Dockerfile jenkins")
|
||||
deleteDir()
|
||||
}
|
||||
image.inside {
|
||||
doUnitTests(test.StashName)
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (isUnix()) {
|
||||
manager.buildUnstable()
|
||||
manager.addWarningBadge "$testName unit test failed on Linux"
|
||||
} else {
|
||||
throw e
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user