Jenkinsfile: Use separate workspaces and clean them up.
This commit is contained in:
parent
54f21d5a5d
commit
d53650dbe7
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@ -67,7 +67,7 @@ def getIW4xExecutable() {
|
|||||||
// 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, wsid, premakeFlags, configuration) {
|
def doBuild(name, wsid, premakeFlags, configuration) {
|
||||||
node("windows") {
|
node("windows") {
|
||||||
ws("./$wsid") {
|
ws("IW4x/build/$wsid") {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
||||||
useShippedPremake {
|
useShippedPremake {
|
||||||
@ -84,8 +84,9 @@ 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) {
|
def doUnitTests(name, wsid) {
|
||||||
node("windows") {
|
node("windows") {
|
||||||
|
ws("IW4x/testing/$wsid") {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
||||||
mw2dir = tool "Modern Warfare 2"
|
mw2dir = tool "Modern Warfare 2"
|
||||||
@ -119,6 +120,8 @@ def doUnitTests(name) {
|
|||||||
rmdir \"zone\\dlc\"
|
rmdir \"zone\\dlc\"
|
||||||
rmdir \"zone\\$localization\"
|
rmdir \"zone\\$localization\"
|
||||||
"""
|
"""
|
||||||
|
deleteDir()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -159,7 +162,7 @@ stage("Testing") {
|
|||||||
{
|
{
|
||||||
def configuration = configurations[i]
|
def configuration = configurations[i]
|
||||||
executions["$configuration"] = {
|
executions["$configuration"] = {
|
||||||
doUnitTests("IW4x $configuration (unit tests)")
|
doUnitTests("IW4x $configuration (unit tests)", configuration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parallel executions
|
parallel executions
|
||||||
@ -168,6 +171,8 @@ stage("Testing") {
|
|||||||
// Collect all the binaries and give each configuration its own subfolder
|
// Collect all the binaries and give each configuration its own subfolder
|
||||||
stage("Publishing") {
|
stage("Publishing") {
|
||||||
node("windows") { // any node will do
|
node("windows") { // any node will do
|
||||||
|
ws("IW4x/pub") {
|
||||||
|
try {
|
||||||
for (int i = 0; i < configurations.size(); i++)
|
for (int i = 0; i < configurations.size(); i++)
|
||||||
{
|
{
|
||||||
def configuration = configurations[i]
|
def configuration = configurations[i]
|
||||||
@ -176,5 +181,9 @@ stage("Publishing") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
archiveArtifacts artifacts: "**/*.dll,**/*.pdb", fingerprint: true
|
archiveArtifacts artifacts: "**/*.dll,**/*.pdb", fingerprint: true
|
||||||
|
} catch {
|
||||||
|
deleteDir()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user