From 976bf8d56d6f759a6a3d83154e33d7696cd4ac23 Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Mon, 3 Oct 2016 21:45:14 +0200 Subject: [PATCH] Fix Jenkinsfile. --- Jenkinsfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fc9bcf59..1876c087 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -85,7 +85,7 @@ def getIW4xExecutable() { $class: 'CopyArtifact', filter: '*', fingerprintArtifacts: true, - projectName: 'iw4x/iw4x-executable/' + iw4xExecutableBranch, + projectName: 'iw4x/iw4x-executable/' + iw4xExecutableBranch(), selector: [ $class: 'TriggeredBuildSelector', allowUpstreamDependencies: false, @@ -170,12 +170,20 @@ def doUnitTests(name) { } } +// Returns the IW4x executable branch to use +def iw4xExecutableBranch() { + try { + return IW4X_EXECUTABLE_BRANCH; + } catch(MissingPropertyException) { + return "master"; + } +} + // Job properties properties([ [$class: "GitLabConnectionProperty", gitLabConnection: "sr0"] ]) - gitlabBuilds(builds: ["Checkout & Versioning", "Build", "Testing", "Archiving"]) { // First though let's give this build a proper name stage("Checkout & Versioning") {