[Jenkins] Implement safety measurement against technical stupidity.

This commit is contained in:
/dev/urandom 2017-02-08 00:21:57 +01:00
parent 3a92d78c7d
commit 8dad28caef
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

4
Jenkinsfile vendored
View File

@ -120,12 +120,13 @@ def doUnitTests(name) {
unstash "$name"
// Get installed localization for correct zonefiles directory junction
def localization = readFile("$mw2dir/localization.txt").split("\r?\n")[0]
def localization = readFile("${tool "Modern Warfare 2"}/localization.txt").split("\r?\n")[0]
try {
timeout(time: 180, unit: "MINUTES") {
// Set up environment
if (isUnix()) {
def mw2dir = tool "Modern Warfare 2"
sh """
mkdir -p zone
for f in main zone/dlc \"zone/$localization\"; do
@ -136,6 +137,7 @@ def doUnitTests(name) {
done
"""
} else {
def mw2dir = tool "Modern Warfare 2"
bat """
mklink /J \"main\" \"$mw2dir\\main\"
mkdir \"zone\"