Initial continuous integration support

This commit is contained in:
Westin Miller
2017-08-19 20:31:08 -07:00
parent 3f881f7d67
commit 234754fd49
2 changed files with 35 additions and 0 deletions

13
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,13 @@
node {
stage 'Checkout'
checkout scm
stage 'Build'
bat 'powershell -File jenkins-grab-se.ps1'
bat 'mklink /J GameBinaries "C:/Steam/Data/DedicatedServer64/"'
bat 'nuget restore Torch.sln'
bat "\"${tool 'MSBuild'}\" Torch.sln /p:Configuration=Release /p:Platform=x64"
state 'Archive'
archive 'bin/x64/Release/Torch.*'
}

22
jenkins-grab-se.ps1 Normal file
View File

@@ -0,0 +1,22 @@
pushd
$steamData = "C:/Steam/Data/"
$steamCMDPath = "C:/Steam/steamcmd/"
$steamCMDZip = "C:/Steam/steamcmd.zip"
Add-Type -AssemblyName System.IO.Compression.FileSystem
if (!(Test-Path $steamData)) {
mkdir "$steamData"
}
if (!(Test-Path $steamCMDPath)) {
if (!(Test-Path $steamCMDZip)) {
(New-Object System.Net.WebClient).DownloadFile("https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip", "$steamCMDZip");
}
[System.IO.Compression.ZipFile]::ExtractToDirectory($steamCMDZip, $steamCMDPath)
}
cd "$steamData"
& "$steamCMDPath/steamcmd.exe" "+login anonymous" "+force_install_dir $steamData" "+app_update 298740" "+quit"
popd