1
0
Fork 0

added status variables

This commit is contained in:
Christian Kühnel 2020-02-17 16:22:51 +00:00
parent a0bc500ac1
commit cbe186f02b

View file

@ -35,6 +35,10 @@ pipeline {
stage("build info"){
steps {
echo "Building diff ${DIFF_ID} with PHID ${PHID}"
script {
success = true
failure_message = ""
}
}
}
stage("git checkout"){
@ -66,6 +70,14 @@ pipeline {
"""
}
}
post {
failure {
script {
success = false
failure_message = "Failed to apply patch"
}
}
}
}
stage('CMake') {
steps {
@ -73,6 +85,14 @@ pipeline {
powershell "${SCRIPT_DIR}/run_cmake.ps1 -projects detect"
}
}
post {
failure {
script {
success = false
failure_message = "Failed to run CMake"
}
}
}
}
stage('ninja all') {
steps {
@ -80,6 +100,14 @@ pipeline {
powershell "${SCRIPT_DIR}/run_ninja.ps1 all"
}
}
post {
failure {
script {
success = false
failure_message = "Failed to run ninja all"
}
}
}
}
stage('ninja check-all') {
steps {
@ -87,10 +115,25 @@ pipeline {
powershell "${SCRIPT_DIR}/run_ninja.ps1 check-all"
}
}
post {
failure {
script {
success = false
failure_message = "Failed to run ninja check-all"
}
}
}
}
}
post {
always {
script {
if (success) {
currentBuild.result = "SUCCESS"
} else {
currentBuild.result = "FAILURE"
}
}
echo "Uploading logs to ${RESULT_URL} ..."
dir("${RESULT_DIR}") {
// gather all result files in a folder
@ -115,7 +158,8 @@ pipeline {
--host "${PHABRICATOR_HOST}/api/" ^
--results-dir "${RESULT_DIR}" ^
--results-url "${RESULT_URL}" ^
--failures "${failure_message}"
--failures "${failure_message}" ^
--buildresult ${currentBuild.result}
"""
dir("${RESULT_DIR}") {
// upload results to