From 762cd6b501c6fad9a1125b71f391f6223bd96c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=BChnel?= Date: Tue, 28 Jan 2020 13:08:51 +0100 Subject: [PATCH] cleanup of build --- .../Phabricator-windows-pipeline/Jenkinsfile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Jenkins/Phabricator-windows-pipeline/Jenkinsfile b/Jenkins/Phabricator-windows-pipeline/Jenkinsfile index 1b0093a..01246cf 100644 --- a/Jenkins/Phabricator-windows-pipeline/Jenkinsfile +++ b/Jenkins/Phabricator-windows-pipeline/Jenkinsfile @@ -25,10 +25,9 @@ pipeline { PHABRICATOR_HOST = 'https://reviews.llvm.org' PHAB_LOG = "${WORKSPACE}/build/.phabricator-comment" MY_BUILD_ID = "${JOB_BASE_NAME}-${BUILD_NUMBER}" - TARGET_DIR = "/mnt/nfs/results/${MY_BUILD_ID}" RESULT_URL = "http://results.llvm-merge-guard.org/${MY_BUILD_ID}" - DIFF_JSON = "${WORKSPACE}/build/diff.json" SCRIPT_DIR = "${WORKSPACE}/llvm-premerge-checks/scripts" + // store all build results here, will be uploaded to GCS later RESULT_DIR = "${WORKSPACE}\\results" LLVM_DIR = "${WORKSPACE}\\llvm-project" } @@ -52,7 +51,11 @@ pipeline { bat 'if exist "build" rd /s/q "build"' git url: 'https://github.com/llvm/llvm-project.git' } - powershell "New-Item -ItemType Directory -Force -Path ${RESULT_DIR}" + // create ${RESULT_DIR} + powershell """ + Remove-Item ${RESULT_DIR} -Recurse -ErrorAction Ignore + New-Item -ItemType Directory -Force -Path ${RESULT_DIR} | Out-Null + """ } } stage('arc patch'){ @@ -97,17 +100,15 @@ pipeline { Invoke-WebRequest -OutFile console-log.txt -uri "http://jenkins.local:8080/job/${JOB_BASE_NAME}/${BUILD_NUMBER}/consoleText" -ErrorAction "Continue" Write-Host "Copying build artefacts..." - Copy-Item "${LLVM_DIR}\\build\\CMakeCache.txt" -ErrorAction SilentlyContinue - Copy-Item "${LLVM_DIR}\\build\\test-results.xml" -ErrorAction SilentlyContinue + Copy-Item "${LLVM_DIR}\\build\\CMakeCache.txt" -ErrorAction Continue + Copy-Item "${LLVM_DIR}\\build\\test-results.xml" -ErrorAction Continue Write-Host "Uploading results to GCS..." - \$ErrorActionPreference = 'SilentlyContinue' - gsutil cp -Z *.* gs://llvm-premerge-checks/results/${MY_BUILD_ID}/ + \$ErrorActionPreference = 'Continue' + gsutil cp -Z -c *.* gs://llvm-premerge-checks/results/${MY_BUILD_ID}/ Write-Host "Done." """ } - // doesn't find junit results, not sure why... - // junit "${LLVM_DIR}\\build\\test-results.xml" } }