Jenkinsfile: Put shipped Premake5 into PATH.

This commit is contained in:
/dev/urandom 2016-09-13 03:07:56 +02:00
parent 283a747352
commit 45a633e672
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

14
Jenkinsfile vendored
View File

@ -42,15 +42,19 @@ import groovy.transform.Field
"ReleaseStatic" "ReleaseStatic"
] ]
def useShippedPremake(f) {
def premakeHome = "${pwd()}\\tools"
withEnv(["PATH+=${premakeHome}"], f)
}
// This will build the IW4x client. // This will build the IW4x client.
// We need a Windows Server with Visual Studio 2015, Premake5 and Git on it. // We need a Windows Server with Visual Studio 2015, Premake5 and Git on it.
def doBuild(name, premakeFlags, configuration) { def doBuild(name, premakeFlags, configuration) {
node("windows") { node("windows") {
checkout scm checkout scm
premakeHome = "${pwd()}\\tools" useShippedPremake {
withEnv(["PATH+=${premakeHome}"]) {
def outputDir = pwd() def outputDir = pwd()
def msbuild = tool "Microsoft.NET MSBuild 14.0" def msbuild = tool "Microsoft.NET MSBuild 14.0"
bat "premake5 vs2015 $premakeFlags" bat "premake5 vs2015 $premakeFlags"
@ -105,11 +109,13 @@ stage("Checkout & Versioning") {
node("windows") { node("windows") {
checkout scm checkout scm
version = bat(returnStdout: true, script: 'premake5 version').split("\r?\n")[1] useShippedPremake {
def version = bat(returnStdout: true, script: 'premake5 version').split("\r?\n")[1]
currentBuild.setDisplayName "$version (#${env.BUILD_NUMBER})" currentBuild.setDisplayName "$version (#${env.BUILD_NUMBER})"
} }
} }
}
// For each available configuration generate a normal build and a unit test build. // For each available configuration generate a normal build and a unit test build.
stage("Build") { stage("Build") {