Merge pull request #77 from TorchAPI/jenkins
Continuous Integration Support
This commit is contained in:
23
Jenkinsfile
vendored
Normal file
23
Jenkinsfile
vendored
Normal 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
22
jenkins-grab-se.ps1
Normal 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
|
Reference in New Issue
Block a user