1
0
Fork 0

added error handling and logging to post action

This commit is contained in:
Christian Kühnel 2020-01-27 15:14:12 +01:00
parent ed0fb93e67
commit 5d4a97a997

View file

@ -93,15 +93,17 @@ pipeline {
// gather all result files in a folder, then upload everything to
// Google Cloud Storage
powershell """
# get the console log
Write-Host "Getting the console log..."
Invoke-WebRequest -OutFile console-log.txt -uri "http://jenkins.local:8080/job/${JOB_BASE_NAME}/${BUILD_NUMBER}/consoleText" -ErrorAction "Continue"
Copy-Item "${LLVM_DIR}\\build\\CMakeCache.txt"
Copy-Item "${LLVM_DIR}\\build\\test-results.xml"
Write-Host "Copying build artefacts..."
Copy-Item "${LLVM_DIR}\\build\\CMakeCache.txt" -ErrorAction=Continue
Copy-Item "${LLVM_DIR}\\build\\test-results.xml" -ErrorAction=Continue
# upload files
Write-Host "Uploading results to GCS..."
\$ErrorActionPreference = 'SilentlyContinue'
gsutil cp -Z *.* gs://llvm-premerge-checks/results/${MY_BUILD_ID}/
Write-Host "Done."
"""
}
// doesn't find junit results, not sure why...