From e4dd2c45d0025f48749e1c473c7facb60a5887e4 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Tue, 12 Sep 2023 16:17:54 +0000 Subject: [PATCH] WIP --- build-system/scripts/check_rebuild | 2 ++ build-system/scripts/cond_spot_run_build | 4 ++-- build-system/scripts/cond_spot_run_script | 10 +++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/build-system/scripts/check_rebuild b/build-system/scripts/check_rebuild index d80e9493684..3b0561836fe 100755 --- a/build-system/scripts/check_rebuild +++ b/build-system/scripts/check_rebuild @@ -7,6 +7,8 @@ set -euo pipefail TAG=$1 REPOSITORY=$2 +exit 1 + # If given nothing, then exit with failure to rebuild [ -n "$TAG" ] || exit 1 diff --git a/build-system/scripts/cond_spot_run_build b/build-system/scripts/cond_spot_run_build index 1c47a63c6c2..813f7b6d63e 100755 --- a/build-system/scripts/cond_spot_run_build +++ b/build-system/scripts/cond_spot_run_build @@ -13,8 +13,8 @@ echo "Content hash tag: cache-$CONTENT_HASH" cd $(query_manifest buildDir $REPOSITORY) -#if ! check_rebuild cache-$CONTENT_HASH $REPOSITORY; then +if ! check_rebuild cache-$CONTENT_HASH $REPOSITORY; then init_submodules $REPOSITORY spot_run_script $CONTENT_HASH $SPEC $BUILD_SYSTEM_PATH/remote_build/remote_build $REPOSITORY $@ retry tag_remote_image $REPOSITORY cache-$CONTENT_HASH cache-$CONTENT_HASH -#fi +fi diff --git a/build-system/scripts/cond_spot_run_script b/build-system/scripts/cond_spot_run_script index 3fe9cb8053c..6fd419974a4 100755 --- a/build-system/scripts/cond_spot_run_script +++ b/build-system/scripts/cond_spot_run_script @@ -24,8 +24,8 @@ shift CONTENT_HASH=$(calculate_content_hash $REPOSITORY) echo "Content hash tag: cache-$CONTENT_HASH-$SUCCESS_TAG" -#if ! check_rebuild cache-$CONTENT_HASH-$SUCCESS_TAG $REPOSITORY; then -init_submodules $REPOSITORY -spot_run_script $CONTENT_HASH $@ -retry tag_remote_image $REPOSITORY cache-$CONTENT_HASH cache-$CONTENT_HASH-$SUCCESS_TAG -#fi +if ! check_rebuild cache-$CONTENT_HASH-$SUCCESS_TAG $REPOSITORY; then + init_submodules $REPOSITORY + spot_run_script $CONTENT_HASH $@ + retry tag_remote_image $REPOSITORY cache-$CONTENT_HASH cache-$CONTENT_HASH-$SUCCESS_TAG +fi