diff --git a/Jenkinsfile b/Jenkinsfile index effd37e41c..dfa8f844c5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -760,6 +760,25 @@ pipeline { } } } + post { + always { + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') { + powershell ''' + $bundleName="windowsRS1-integration" + Write-Host -ForegroundColor Green "Creating ${bundleName}-bundles.zip" + + # archiveArtifacts does not support env-vars to , so save the artifacts in a fixed location + Compress-Archive -Path "${env:TEMP}/CIDUT.out", "${env:TEMP}/CIDUT.err" -CompressionLevel Optimal -DestinationPath "${bundleName}-bundles.zip" + ''' + + archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true + } + } + cleanup { + sh 'make clean' + deleteDir() + } + } } stage('win-RS5') { when { @@ -800,6 +819,25 @@ pipeline { } } } + post { + always { + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') { + powershell ''' + $bundleName="windowsRS5-integration" + Write-Host -ForegroundColor Green "Creating ${bundleName}-bundles.zip" + + # archiveArtifacts does not support env-vars to , so save the artifacts in a fixed location + Compress-Archive -Path "${env:TEMP}/CIDUT.out", "${env:TEMP}/CIDUT.err" -CompressionLevel Optimal -DestinationPath "${bundleName}-bundles.zip" + ''' + + archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true + } + } + cleanup { + sh 'make clean' + deleteDir() + } + } } } } diff --git a/hack/ci/windows.ps1 b/hack/ci/windows.ps1 index 8dc30e368d..4c6368ec42 100644 --- a/hack/ci/windows.ps1 +++ b/hack/ci/windows.ps1 @@ -999,6 +999,10 @@ Finally { Set-Location "$env:SOURCES_DRIVE\$env:SOURCES_SUBDIR" -ErrorAction SilentlyContinue Nuke-Everything + + # Restore the TEMP path + if ($null -ne $TEMPORIG) { $env:TEMP="$TEMPORIG" } + $Dur=New-TimeSpan -Start $StartTime -End $(Get-Date) Write-Host -ForegroundColor $FinallyColour "`nINFO: executeCI.ps1 exiting at $(date). Duration $dur`n"