Require BOOTSTRAP_MIGRATION, JENKINS_BUILD_STARTED or JENKINS_BUILD_FINISHED

This commit is contained in:
Erick Fejta 2016-11-16 16:37:59 -08:00
parent d51e27fe96
commit 32e2f22019

View File

@ -281,13 +281,15 @@ function upload_artifacts_and_build_result() {
echo -e "\n\n\n*** View logs and artifacts at ${results_url} ***\n\n" echo -e "\n\n\n*** View logs and artifacts at ${results_url} ***\n\n"
} }
if [[ -n "${JENKINS_BUILD_STARTED:-}" ]]; then if [[ -z "${BOOTSTRAP_MIGRATION:-}" ]]; then
upload_version if [[ -n "${JENKINS_BUILD_STARTED:-}" ]]; then
elif [[ -n "${JENKINS_BUILD_FINISHED:-}" ]]; then upload_version
upload_artifacts_and_build_result ${JENKINS_BUILD_FINISHED} elif [[ -n "${JENKINS_BUILD_FINISHED:-}" ]]; then
update_job_result_cache ${JENKINS_BUILD_FINISHED} upload_artifacts_and_build_result ${JENKINS_BUILD_FINISHED}
else update_job_result_cache ${JENKINS_BUILD_FINISHED}
echo "Called without JENKINS_BUILD_STARTED or JENKINS_BUILD_FINISHED set." else
echo "Assuming a legacy invocation." echo "ERROR: Called without JENKINS_BUILD_STARTED or JENKINS_BUILD_FINISHED set."
upload_artifacts_and_build_result "[UNSET]" echo "ERROR: this should not happen"
exit 1
fi
fi fi