From 8571d8bfc805d1e4ca731b5c021e89f3a7da86f3 Mon Sep 17 00:00:00 2001 From: Arthur Meyre Date: Mon, 20 Sep 2021 17:53:24 +0200 Subject: [PATCH] fix(build): check latest env image to decide a rebuild - we now have preflight images which break the previous logic of checking the most recent image timestamp, check image tagged with latest --- script/actions_utils/container_timestamp_check.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/actions_utils/container_timestamp_check.sh b/script/actions_utils/container_timestamp_check.sh index 902171e7f..a36181f5f 100755 --- a/script/actions_utils/container_timestamp_check.sh +++ b/script/actions_utils/container_timestamp_check.sh @@ -58,7 +58,8 @@ ENV_JSON=$(curl \ -H "Authorization: token ${TOKEN}" \ "${ENV_IMG_ENDPOINT_URL}") -ENV_IMG_TIMESTAMP=$(echo "${ENV_JSON}" | jq -r 'sort_by(.updated_at)[-1].updated_at') +ENV_IMG_TIMESTAMP=$(echo "${ENV_JSON}" | \ +jq -rc '.[] | select(.metadata.container.tags[] | contains("latest")).updated_at' echo "Base timestamp: ${BASE_IMG_TIMESTAMP}" echo "Env timestamp: ${ENV_IMG_TIMESTAMP}"