2019-07-13 18:24:19 +00:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
environment {
|
2019-07-13 18:44:50 +00:00
|
|
|
APP_NAME = "SoundVision"
|
2019-07-13 18:24:19 +00:00
|
|
|
RUBY = "C:\\Ruby25-x64\\bin\\u3d"
|
|
|
|
MXBUILD = "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe\""
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Build'){
|
|
|
|
steps{
|
|
|
|
|
|
|
|
echo 'Generate Build Number File'
|
2019-07-13 18:44:50 +00:00
|
|
|
writeFile file: 'UnityProject/Assets/Resources/buildNumber.txt', text: "${BUILD_NUMBER}"
|
2019-07-13 18:24:19 +00:00
|
|
|
|
|
|
|
echo 'Building Unity Project'
|
2019-07-13 18:44:50 +00:00
|
|
|
bat "${RUBY} run -u 2018.4.3f1 -r -- -batchmode -nographics -quit -projectPath '${workspace}\\UnityProject' -executeMethod AppBuilder.Build"
|
2019-07-13 18:24:19 +00:00
|
|
|
echo 'Stash unity build'
|
|
|
|
stash includes: 'bin/**/*', name: 'unity build'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Test'){
|
|
|
|
steps{
|
|
|
|
echo 'Unit Test'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Setup')
|
|
|
|
{
|
|
|
|
steps{
|
|
|
|
echo 'Build Installer'
|
|
|
|
unstash 'unity build'
|
|
|
|
|
2019-07-13 18:44:50 +00:00
|
|
|
bat "${MXBUILD} .\\setup\\setup.sln /property:Configuration=Release"
|
|
|
|
|
2019-07-13 19:02:21 +00:00
|
|
|
stash includes: "${APP_NAME}.msi", name: 'installer build'
|
2019-07-13 18:24:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Publish')
|
|
|
|
{
|
|
|
|
steps{
|
|
|
|
echo 'publish Build'
|
|
|
|
unstash 'installer build'
|
|
|
|
|
2019-07-13 19:17:43 +00:00
|
|
|
cifsPublisher(publishers: [[configName: 'Cylvester Share', transfers: [[cleanRemote: false, excludes: '', flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: 'Build${BUILD_NUMBER}', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'SoundVision.msi']], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: true]])
|
2019-07-13 18:24:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|