[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" unstash "$name"
// Get installed localization for correct zonefiles directory junction // 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 { try {
timeout(time: 180, unit: "MINUTES") { timeout(time: 180, unit: "MINUTES") {
// Set up environment // Set up environment
if (isUnix()) { if (isUnix()) {
def mw2dir = tool "Modern Warfare 2"
sh """ sh """
mkdir -p zone mkdir -p zone
for f in main zone/dlc \"zone/$localization\"; do for f in main zone/dlc \"zone/$localization\"; do
@ -136,6 +137,7 @@ def doUnitTests(name) {
done done
""" """
} else { } else {
def mw2dir = tool "Modern Warfare 2"
bat """ bat """
mklink /J \"main\" \"$mw2dir\\main\" mklink /J \"main\" \"$mw2dir\\main\"
mkdir \"zone\" mkdir \"zone\"