diff --git a/build/jenkins/pipelines/macos-differential.Jenkinsfile b/build/jenkins/pipelines/macos-differential.Jenkinsfile index 72f23f0fe6..4aa8c61f90 100644 --- a/build/jenkins/pipelines/macos-differential.Jenkinsfile +++ b/build/jenkins/pipelines/macos-differential.Jenkinsfile @@ -35,7 +35,7 @@ pipeline { steps { script { try { - svn "https://svn.wildfiregames.com/public/ps/trunk" + sh "svn update" } catch(e) { sh "svn cleanup" sleep 300 @@ -51,8 +51,10 @@ pipeline { try { sh "arc patch --diff ${params.DIFF_ID} --force" } catch (e) { + sh "svn st binaries/data/ | cut -c 9- | xargs rm -rfv" + sh "svn st source/ | cut -c 9- | xargs rm -rfv" + sh "svn st -q | cut -c 9- | xargs rm -rfv" sh "svn revert -R ." - sh "svn st | cut -c 9- | xargs rm -rf" sh "arc patch --diff ${params.DIFF_ID} --force" } } @@ -112,10 +114,10 @@ pipeline { catchError { sh ''' for file in builderr-*.txt ; do - if [ -s "$file" ]; then - echo "$file" >> .phabricator-comment - cat "$file" >> .phabricator-comment - fi + if [ -s "$file" ]; then + echo "$file" >> .phabricator-comment + cat "$file" >> .phabricator-comment + fi done ''' } @@ -130,9 +132,10 @@ pipeline { throw e } finally { sh "rm -f .phabricator-comment builderr-*.txt cxxtest-*.xml" + sh "svn st binaries/data/ | cut -c 9- | xargs rm -rfv" + sh "svn st source/ | cut -c 9- | xargs rm -rfv" + sh "svn st -q | cut -c 9- | xargs rm -rfv" sh "svn revert -R ." - sh "svn st binaries/data/ | cut -c 9- | xargs rm -rf" - sh "svn st source/ | cut -c 9- | xargs rm -rf" } } } diff --git a/build/jenkins/pipelines/vs2015-differential.Jenkinsfile b/build/jenkins/pipelines/vs2015-differential.Jenkinsfile index 8b8af20781..0112d01e81 100644 --- a/build/jenkins/pipelines/vs2015-differential.Jenkinsfile +++ b/build/jenkins/pipelines/vs2015-differential.Jenkinsfile @@ -18,6 +18,13 @@ // This pipeline is used to build patches on MSVC 15.0 (Visual Studio 2017). def jobs = "2" +def visualStudioPath = "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe\"" +def cleanFiles() { + bat 'powershell.exe "svn st -q | ForEach-Object { Remove-Item -ErrorAction Ignore -Recurse -Force -Verbose -LiteralPath $_.substring(8) } " ' + bat 'powershell.exe "svn st binaries/data | ForEach-Object { Remove-Item -ErrorAction Ignore -Recurse -Verbose -Force -LiteralPath $_.substring(8) } " ' + bat 'powershell.exe "svn st source/ | ForEach-Object { Remove-Item -ErrorAction Ignore -Recurse -Force -Verbose -LiteralPath $_.substring(8) } " ' + bat 'svn revert -R .' +} pipeline { agent { label 'WindowsSlave' } options { @@ -51,10 +58,9 @@ pipeline { steps { script { try { - bat "arc patch --diff ${params.DIFF_ID} --force" + bat "arc patch --diff ${params.DIFF_ID} --force" } catch (e) { - bat 'svn revert -R .' - bat 'powershell.exe "svn st --no-ignore | %% {$_.substring(8)} | del -r" ' + cleanFiles() bat "arc patch --diff ${params.DIFF_ID} --force" } } @@ -62,15 +68,15 @@ pipeline { } stage ('Update-Workspace') { steps { - bat "(robocopy /MIR C:\\wxwidgets3.0.4\\lib libraries\\win32\\wxwidgets\\lib) ^& IF %ERRORLEVEL% LEQ 1 exit 0" - bat "(robocopy /MIR C:\\wxwidgets3.0.4\\include libraries\\win32\\wxwidgets\\include) ^& IF %ERRORLEVEL% LEQ 1 exit 0" + bat "(robocopy /MIR /NDL /NJH /NJS /NP /NS /NC C:\\wxwidgets3.0.4\\lib libraries\\win32\\wxwidgets\\lib) ^& IF %ERRORLEVEL% LEQ 1 exit 0" + bat "(robocopy /MIR /NDL /NJH /NJS /NP /NS /NC C:\\wxwidgets3.0.4\\include libraries\\win32\\wxwidgets\\include) ^& IF %ERRORLEVEL% LEQ 1 exit 0" bat "cd build\\workspaces && update-workspaces.bat --atlas --build-shared-glooxwrapper --jenkins-tests" } } stage ('Debug: Build') { steps { dir('build\\workspaces\\vs2017'){ - bat("\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe\" pyrogenesis.sln /p:XPDeprecationWarning=false /m:${jobs} /p:PlatformToolset=v141_xp /t:pyrogenesis /t:AtlasUI /t:test /p:Configuration=Debug -clp:Warningsonly -clp:ErrorsOnly > ..\\..\\..\\build-errors-debug.txt 2>&1") + bat("${visualStudioPath} pyrogenesis.sln /nologo /p:XPDeprecationWarning=false /m:${jobs} /p:PlatformToolset=v141_xp /t:pyrogenesis /t:AtlasUI /t:test /p:Configuration=Debug -clp:Warningsonly -clp:ErrorsOnly > ..\\..\\..\\build-errors-debug.txt 2>&1") } } post { @@ -106,7 +112,7 @@ pipeline { stage ('Release: Build') { steps { dir('build\\workspaces\\vs2017'){ - bat("\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe\" pyrogenesis.sln /p:XPDeprecationWarning=false /m:${jobs} /p:PlatformToolset=v141_xp /t:pyrogenesis /t:AtlasUI /t:test /p:Configuration=Release -clp:Warningsonly -clp:ErrorsOnly > ..\\..\\..\\build-errors-release.txt 2>&1") + bat("${visualStudioPath} pyrogenesis.sln /nologo /p:XPDeprecationWarning=false /m:${jobs} /p:PlatformToolset=v141_xp /t:pyrogenesis /t:AtlasUI /t:test /p:Configuration=Release -clp:Warningsonly -clp:ErrorsOnly > ..\\..\\..\\build-errors-release.txt 2>&1") } } post { @@ -136,9 +142,9 @@ pipeline { always { script { catchError { - bat "if exist build-errors-debug.txt echo Debug: >> .phabricator-comment" + bat 'powershell.exe "if (![String]::IsNullOrWhiteSpace((Get-Content -ErrorAction Ignore -Path build-errors-debug.txt))) { Add-Content .phabricator-comment Debug: }" ' bat "if exist build-errors-debug.txt type build-errors-debug.txt >> .phabricator-comment" - bat "if exist build-errors-release.txt echo Release: >> .phabricator-comment" + bat 'powershell.exe "if (![String]::IsNullOrWhiteSpace((Get-Content -ErrorAction Ignore -Path build-errors-release.txt))) { Add-Content .phabricator-comment Release: }" ' bat "if exist build-errors-release.txt type build-errors-release.txt >> .phabricator-comment" } try { @@ -153,9 +159,7 @@ pipeline { bat 'del build-errors-debug.txt' bat 'del build-errors-release.txt' bat 'del cxxtest_*.xml' - bat 'svn revert -R .' - bat 'powershell.exe "svn st binaries/data | %% {$_.substring(8)} | del -r " ' - bat 'powershell.exe "svn st source/ | %% {$_.substring(8)} | del -r " ' + cleanFiles() } } }