X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fxci%2Fbifrost-verify.sh;h=03d9afccde2df7c120370969fd3bb7127a82fa7c;hb=b584f4d1b522b2dc62b664c5dca33e121a2efab2;hp=2e6f2272c2e38d3c4bf54885b072b23cdf1f727c;hpb=f1415796efec4984962f9817639a5ff2cd9ecd41;p=releng.git diff --git a/jjb/xci/bifrost-verify.sh b/jjb/xci/bifrost-verify.sh index 2e6f2272c..03d9afccd 100755 --- a/jjb/xci/bifrost-verify.sh +++ b/jjb/xci/bifrost-verify.sh @@ -57,16 +57,17 @@ EOF 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,33 +84,36 @@ 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 } # check distro to see if we support it -if [[ ! "$DISTRO" =~ (trusty|centos7|suse) ]]; then +if [[ ! "$DISTRO" =~ (xenial|centos7|suse) ]]; then echo "Distro $DISTRO is not supported!" exit 1 fi # remove previously cloned repos -/bin/rm -rf $WORKSPACE/bifrost $WORKSPACE/releng +/bin/rm -rf $WORKSPACE/bifrost $WORKSPACE/releng-xci # Fix up permissions fix_ownership # clone all the repos first and checkout the patch afterwards git clone https://git.openstack.org/openstack/bifrost $WORKSPACE/bifrost -git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng +git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE/releng-xci # checkout the patch cd $CLONE_LOCATION git fetch $PROJECT_REPO $GERRIT_REFSPEC && sudo git checkout FETCH_HEAD # combine opnfv and upstream scripts/playbooks -/bin/cp -rf $WORKSPACE/releng/prototypes/bifrost/* $WORKSPACE/bifrost/ +/bin/cp -rf $WORKSPACE/releng-xci/bifrost/* $WORKSPACE/bifrost/ # cleanup remnants of previous deployment cd $WORKSPACE/bifrost