From 5fcb5cd2d9fea03d35a66128e540e00b8eba0193 Mon Sep 17 00:00:00 2001 From: Joe Doss Date: Fri, 2 Jul 2021 16:03:06 -0500 Subject: [PATCH] Expire the SHA tag after 2 months. (#14058) * Expire the SHA tag after 2 months. * Add --tag --- scripts/build_containers.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/build_containers.sh b/scripts/build_containers.sh index b3ba7af5d..614966c7d 100755 --- a/scripts/build_containers.sh +++ b/scripts/build_containers.sh @@ -67,10 +67,15 @@ function create_production_containers { --cache-from="${CONTAINER_REPO}"/"${CONTAINER_APP}":builder \ --cache-from="${CONTAINER_REPO}"/"${CONTAINER_APP}":production \ --tag "${CONTAINER_REPO}"/"${CONTAINER_APP}":$(date +%Y%m%d) \ - --tag "${CONTAINER_REPO}"/"${CONTAINER_APP}":${BUILDKITE_COMMIT:0:7} \ --tag "${CONTAINER_REPO}"/"${CONTAINER_APP}":production \ --tag "${CONTAINER_REPO}"/"${CONTAINER_APP}":latest . + docker build --target production \ + --label quay.expires-after=8w \ + --cache-from="${CONTAINER_REPO}"/"${CONTAINER_APP}":builder \ + --cache-from="${CONTAINER_REPO}"/"${CONTAINER_APP}":production \ + --tag "${CONTAINER_REPO}"/"${CONTAINER_APP}":${BUILDKITE_COMMIT:0:7} . + # Build the testing image docker build --target testing \ --cache-from="${CONTAINER_REPO}"/"${CONTAINER_APP}":builder \