Jenkinsfile: Workaround for Jenkins bug regarding changing dir in Docker container and path fix.
This commit is contained in:
parent
c902909923
commit
f5f128313f
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
@ -85,7 +85,6 @@ def doBuild(name, wsid, premakeFlags, configuration) {
|
|||||||
// This will run the unit tests for IW4x.
|
// This will run the unit tests for IW4x.
|
||||||
// We need a Windows Server with MW2 on it.
|
// We need a Windows Server with MW2 on it.
|
||||||
def doUnitTests(name, wsid) {
|
def doUnitTests(name, wsid) {
|
||||||
ws("IW4x/testing/$wsid") {
|
|
||||||
mw2dir = tool "Modern Warfare 2"
|
mw2dir = tool "Modern Warfare 2"
|
||||||
|
|
||||||
unstash "$name"
|
unstash "$name"
|
||||||
@ -121,6 +120,7 @@ def doUnitTests(name, wsid) {
|
|||||||
// Run tests
|
// Run tests
|
||||||
getIW4xExecutable()
|
getIW4xExecutable()
|
||||||
if (isUnix()) {
|
if (isUnix()) {
|
||||||
|
sh "ls"
|
||||||
sh "wine-wrapper iw4x.exe -tests"
|
sh "wine-wrapper iw4x.exe -tests"
|
||||||
} else {
|
} else {
|
||||||
bat "iw4x.exe -tests"
|
bat "iw4x.exe -tests"
|
||||||
@ -138,7 +138,6 @@ def doUnitTests(name, wsid) {
|
|||||||
deleteDir()
|
deleteDir()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Job properties
|
// Job properties
|
||||||
properties([
|
properties([
|
||||||
@ -188,15 +187,17 @@ gitlabBuilds(builds: ["Checkout & Versioning", "Build", "Testing", "Archiving"])
|
|||||||
def configuration = configurations[i]
|
def configuration = configurations[i]
|
||||||
executions["$configuration on Windows"] = {
|
executions["$configuration on Windows"] = {
|
||||||
node("windows") {
|
node("windows") {
|
||||||
|
ws("IW4x/testing/$wsid") {
|
||||||
doUnitTests("IW4x $configuration (unit tests)", configuration)
|
doUnitTests("IW4x $configuration (unit tests)", configuration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
executions["$configuration on Linux"] = {
|
executions["$configuration on Linux"] = {
|
||||||
node("docker && linux && amd64") {
|
node("docker && linux && amd64") {
|
||||||
def image = null
|
def image = null
|
||||||
dir("src") {
|
dir("src") {
|
||||||
checkout scm
|
checkout scm
|
||||||
image = docker.build("github.com/IW4x/iw4x-client-testing-wine32", "--rm --force-rm -f wine32.Dockerfile jenkins")
|
image = docker.build("github.com/IW4x/iw4x-client-testing-wine32", "--rm --force-rm -f jenkins/wine32.Dockerfile jenkins")
|
||||||
deleteDir()
|
deleteDir()
|
||||||
}
|
}
|
||||||
image.inside {
|
image.inside {
|
||||||
|
Loading…
Reference in New Issue
Block a user