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
This commit is contained in:
Arthur Meyre
2021-09-20 17:53:24 +02:00
parent 10cbfa1652
commit 8571d8bfc8

View File

@@ -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}"