From 976490bc1962651b2d0770b511b7c283222cf76a Mon Sep 17 00:00:00 2001 From: Guilherme Salazar Date: Wed, 29 Jun 2022 11:04:49 -0300 Subject: [PATCH] fix(per-commit) add a `nightly` label Historically, kong-build-tools would update the `latest` tag for each new per-commit release. Since acfda16, that is no longer the case. Given it's useful to have a generic name for the latest build of kong - and we want to avoid pushing a tag named `latest`, so as to avoid surprises when users pull `kong/kong`- this commit adds a `nightly` tag. Such tag will be used, for example, in decK's CI, where we want to test against the latest available build of Kong. --- release-kong.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/release-kong.sh b/release-kong.sh index 0860fc1a..fd69c9c2 100755 --- a/release-kong.sh +++ b/release-kong.sh @@ -59,6 +59,8 @@ DIST_FILE="$KONG_PACKAGE_NAME-$KONG_VERSION$OUTPUT_FILE_SUFFIX" function push_docker_images() { + KONG_BRANCH=${KONG_BRANCH:-master} + docker tag \ "localhost:5000/kong-$RESTY_IMAGE_BASE-$RESTY_IMAGE_TAG" \ "$DOCKER_REPOSITORY:$ARCHITECTURE-$KONG_VERSION" @@ -74,6 +76,11 @@ function push_docker_images() { -a "$DOCKER_REPOSITORY:$KONG_VERSION-$RESTY_IMAGE_BASE" \ "$DOCKER_REPOSITORY:$ARCHITECTURE-$KONG_VERSION" docker manifest push "$DOCKER_REPOSITORY:$KONG_VERSION-$RESTY_IMAGE_BASE" + + docker manifest create \ + -a "$DOCKER_REPOSITORY:$KONG_BRANCH" \ + "$DOCKER_REPOSITORY:$ARCHITECTURE-$KONG_VERSION" + docker manifest push "$DOCKER_REPOSITORY:$KONG_BRANCH" }