Merge pull request #77 from TorchAPI/jenkins

Continuous Integration Support
This commit is contained in:
Westin Miller
2017-08-19 21:43:18 -07:00
committed by GitHub
2 changed files with 45 additions and 0 deletions

23
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,23 @@
node {
stage('Checkout') {
checkout scm
}
stage('Acquire SE') {
bat 'powershell -File jenkins-grab-se.ps1'
bat 'rmdir GameBinaries'
bat 'mklink /J GameBinaries "C:/Steam/Data/DedicatedServer64/"'
}
stage('Acquire NuGet Packages') {
bat 'nuget restore Torch.sln'
}
stage('Build') {
bat "\"${tool 'MSBuild'}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