summaryrefslogtreecommitdiffstats
path: root/jjb/xci
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-08-16 08:55:47 +0100
committerMarkos Chandras <mchandras@suse.de>2017-08-16 09:01:00 +0100
commit001de83c0b890e71790c84b711cc593eb4628034 (patch)
treef4c5885b06a8c8bf5468d96ca868534c79fab822 /jjb/xci
parent63bfdf7e1ae7cd5f2591e7ecf9a17fcd49f85fb1 (diff)
jjb: xci: bifrost-verify: Disable errexit when uploading logs
The errexit option is there to catch failures when the job is executed. We don't want to mark the entire job as failed when we have troubles uploading the logs when the actual job has passed so we disable the errexit option to make the whole process less aggressive. Moreover, we move the build log upload to the end of the operation so we can catch as much output as possible. Change-Id: Ice126471a8c837c54c95c8ef0935c059d37ea91b Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'jjb/xci')
-rwxr-xr-xjjb/xci/bifrost-verify.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/jjb/xci/bifrost-verify.sh b/jjb/xci/bifrost-verify.sh
index 14c8d37e9..03d9afccd 100755
--- a/jjb/xci/bifrost-verify.sh
+++ b/jjb/xci/bifrost-verify.sh
@@ -57,16 +57,17 @@ EOF
</html>
EOF
+ # Upload landing page
+ echo "Uploading the landing page"
+ gsutil -q cp ${WORKSPACE}/index.html ${BIFROST_GS_URL}/index.html
+ rm -f ${WORKSPACE}/index.html
+
# Finally, download and upload the entire build log so we can retain
# as much build information as possible
echo "Uploading the final console output"
curl -s -L ${BIFROST_CONSOLE_LOG} > ${WORKSPACE}/build_log.txt
gsutil -q cp -Z ${WORKSPACE}/build_log.txt ${BIFROST_GS_URL}/build_log.txt
- rm ${WORKSPACE}/build_log.txt
-
- # Upload landing page
- gsutil -q cp ${WORKSPACE}/index.html ${BIFROST_GS_URL}/index.html
- rm ${WORKSPACE}/index.html
+ rm -f ${WORKSPACE}/build_log.txt
}
function fix_ownership() {
@@ -83,6 +84,9 @@ function fix_ownership() {
function cleanup_and_upload() {
original_exit=$?
+ echo "Job exit code: $original_exit"
+ # Turn off errexit
+ set +o errexit
fix_ownership
upload_logs
exit $original_exit