uploading results to Google Cloud Storge
This commit is contained in:
parent
951c5dbe2d
commit
b575ac7233
1 changed files with 16 additions and 10 deletions
26
Jenkins/master-windows-pipeline/Jenkinsfile
vendored
26
Jenkins/master-windows-pipeline/Jenkinsfile
vendored
|
@ -25,7 +25,7 @@ pipeline {
|
||||||
environment {
|
environment {
|
||||||
MY_BUILD_ID = "${JOB_BASE_NAME}-${BUILD_NUMBER}"
|
MY_BUILD_ID = "${JOB_BASE_NAME}-${BUILD_NUMBER}"
|
||||||
SCRIPT_DIR = "${WORKSPACE}/llvm-premerge-checks/scripts"
|
SCRIPT_DIR = "${WORKSPACE}/llvm-premerge-checks/scripts"
|
||||||
RESULT_DIR = "E:\\results\\${MY_BUILD_ID}"
|
RESULT_DIR = "${WORKSPACE}\\results"
|
||||||
LLVM_DIR = "${WORKSPACE}\\llvm-project"
|
LLVM_DIR = "${WORKSPACE}\\llvm-project"
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
|
@ -55,7 +55,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('ninja all') {
|
stage('ninja all') {
|
||||||
steps {
|
steps {
|
||||||
dir"${LLVM_DIR}"){
|
dir("${LLVM_DIR}"){
|
||||||
powershell "${SCRIPT_DIR}/run_ninja.ps1 all"
|
powershell "${SCRIPT_DIR}/run_ninja.ps1 all"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,14 +70,20 @@ pipeline {
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
echo "Console log is available at https://results.new.llvm-merge-guard.org/${MY_BUILD_ID}"
|
echo "Logs uploaded to https://pantheon.corp.google.com/storage/browser/llvm-premerge-checks/results/${MY_BUILD_ID}."
|
||||||
dir("${env.TARGET_DIR}") {
|
dir("${env.RESULT_DIR}") {
|
||||||
// copy console log to result folder
|
// gather all result files in a folder, then upload everything to
|
||||||
powershell "Invoke-WebRequest -OutFile console-log.txt -uri http://jenkins.local:8080/job/${JOB_BASE_NAME}/${BUILD_NUMBER}/consoleText"
|
// Google Cloud Storage
|
||||||
// copy result files, fail silently if they do not exist
|
powershell """
|
||||||
powershell """
|
$ErrorActionPreference = "Continue"
|
||||||
Copy-Item "${LLVM_DIR}\\build\\CMakeCache.txt" -ErrorAction SilentlyContinue
|
# get the console log
|
||||||
Copy-Item "${LLVM_DIR}\\build\\test-results.xml" -ErrorAction SilentlyContinue
|
Invoke-WebRequest -OutFile console-log.txt -uri http://jenkins.local:8080/job/${JOB_BASE_NAME}/${BUILD_NUMBER}/consoleText" -ErrorAction
|
||||||
|
|
||||||
|
Copy-Item "${LLVM_DIR}\\build\\CMakeCache.txt"
|
||||||
|
Copy-Item "${LLVM_DIR}\\build\\test-results.xml"
|
||||||
|
|
||||||
|
# upload files
|
||||||
|
gsutil cp *.* gs://llvm-premerge-checks/results/${MY_BUILD_ID}/
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue