Skip to content

Commit

Permalink
feat(nightly) when running the release stage also release to the kong…
Browse files Browse the repository at this point in the history
… docker repository (#237)

* fix(ci) de-dup the test Docker files

* chore(docker-kong) use master to build the test images

* feat(docker) setup docker releases
  • Loading branch information
hutchic authored Mar 17, 2020
1 parent 422adfe commit 860a2f5
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion release-kong.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env bash

set -eo pipefail

CWD=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
Expand All @@ -16,6 +15,19 @@ BUILD_DIR="output"
BINTRAY_PUT_ARGS=""
BINTRAY_DIRECTORY="${RESTY_IMAGE_BASE}/${RESTY_IMAGE_TAG}"

DOCKER_REPOSITORY="kong/kong"
DOCKER_TAG="latest"
if [ "$REPOSITORY_OS_NAME" == "next" ]; then
DOCKER_TAG="dev"
fi

if [ "$RESTY_IMAGE_BASE" != "src" ]; then
docker tag localhost:5000/kong-${RESTY_IMAGE_BASE}-${RESTY_IMAGE_TAG} ${DOCKER_REPOSITORY}:${KONG_VERSION}-${RESTY_IMAGE_BASE}-${RESTY_IMAGE_TAG}
docker push ${DOCKER_REPOSITORY}:${KONG_VERSION}-${RESTY_IMAGE_BASE}-${RESTY_IMAGE_TAG}
docker tag localhost:5000/kong-${RESTY_IMAGE_BASE}-${RESTY_IMAGE_TAG} ${DOCKER_REPOSITORY}:${DOCKER_TAG}-${RESTY_IMAGE_BASE}-${RESTY_IMAGE_TAG}
docker push ${DOCKER_REPOSITORY}:${DOCKER_TAG}-${RESTY_IMAGE_BASE}-${RESTY_IMAGE_TAG}
fi

if [ "$RESTY_IMAGE_BASE" == "ubuntu" ] || [ "$RESTY_IMAGE_BASE" == "debian" ]; then
BINTRAY_DIRECTORY=""
REPOSITORY_TYPE="${REPOSITORY_TYPE:-deb}"
Expand All @@ -39,6 +51,11 @@ elif [ "$RESTY_IMAGE_BASE" == "alpine" ]; then
REPOSITORY_OS_NAME="${REPOSITORY_OS_NAME:-alpine}"
REPOSITORY_NAME="${REPOSITORY_NAME:-$KONG_PACKAGE_NAME-alpine-tar}"
OUTPUT_FILE_SUFFIX=".${ARCHITECTURE}.apk.tar.gz"
docker tag localhost:5000/kong-${RESTY_IMAGE_BASE}-${RESTY_IMAGE_TAG} ${DOCKER_REPOSITORY}:${KONG_VERSION}
docker push ${DOCKER_REPOSITORY}:${KONG_VERSION}

docker tag localhost:5000/kong-${RESTY_IMAGE_BASE}-${RESTY_IMAGE_TAG} ${DOCKER_REPOSITORY}:${DOCKER_TAG}
docker push ${DOCKER_REPOSITORY}:${DOCKER_TAG}
elif [ "$RESTY_IMAGE_BASE" == "amazonlinux" ]; then
BINTRAY_DIRECTORY="amazonlinux/amazonlinux"
REPOSITORY_TYPE="${REPOSITORY_TYPE:-rpm}"
Expand Down

0 comments on commit 860a2f5

Please sign in to comment.