summaryrefslogtreecommitdiffstats
path: root/screwdriver
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@yahooinc.com>2022-11-25 11:23:36 +0100
committerArnstein Ressem <aressem@yahooinc.com>2022-11-25 11:23:36 +0100
commita3a8b2de904a3983f6a39865cb17670cc08a3891 (patch)
treeffd4ee04e1bf42d4fca0fee45b348cda5890b5a1 /screwdriver
parent59120a5bcb6f0e215b6486f7da6399f9f96630b6 (diff)
Set a floating major tag instead of coding it into the image name.
Diffstat (limited to 'screwdriver')
-rwxr-xr-xscrewdriver/release-container-image.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/screwdriver/release-container-image.sh b/screwdriver/release-container-image.sh
index e08b9e5f14f..0b61a6be281 100755
--- a/screwdriver/release-container-image.sh
+++ b/screwdriver/release-container-image.sh
@@ -9,6 +9,7 @@ if [[ $# -ne 1 ]]; then
fi
readonly VESPA_VERSION=$1
+readonly VESPA_MAJOR=$(echo $VESPA_VERSION | cut -d. -f1)
if [[ -z "$DOCKER_HUB_DEPLOY_KEY" ]]; then
echo "Environment variable DOCKER_HUB_DEPLOY_KEY must be set, but is empty."
@@ -48,7 +49,7 @@ docker context use vespa-context
docker buildx create --name vespa-builder --driver docker-container --use
docker buildx inspect --bootstrap
-for data in "Dockerfile vespa" "Dockerfile.minimal vespa-8-minimal"; do
+for data in "Dockerfile vespa" "Dockerfile.minimal vespa-minimal"; do
set -- $data
DOCKER_FILE=$1
IMAGE_NAME=$2
@@ -59,7 +60,8 @@ for data in "Dockerfile vespa" "Dockerfile.minimal vespa-8-minimal"; do
else
docker login --username aressem --password "$DOCKER_HUB_DEPLOY_KEY"
docker buildx build --progress plain --push --platform linux/amd64,linux/arm64 --build-arg VESPA_VERSION=$VESPA_VERSION \
- --file $DOCKER_FILE --tag docker.io/vespaengine/$IMAGE_NAME:$VESPA_VERSION --tag docker.io/vespaengine/$IMAGE_NAME:latest .
+ --file $DOCKER_FILE --tag docker.io/vespaengine/$IMAGE_NAME:$VESPA_VERSION \
+ --tag docker.io/vespaengine/$IMAGE_NAME:$VESPA_MAJOR --tag docker.io/vespaengine/$IMAGE_NAME:latest .
fi
done
@@ -71,5 +73,6 @@ if grep $VESPA_VERSION <<< "$IMAGE_TAGS" &> /dev/null; then
else
docker login --username aressem --password "$GHCR_DEPLOY_KEY" ghcr.io
docker buildx build --progress plain --push --platform linux/amd64,linux/arm64 --build-arg VESPA_VERSION=$VESPA_VERSION \
- --tag ghcr.io/vespa-engine/vespa:$VESPA_VERSION --tag ghcr.io/vespa-engine/vespa:latest .
+ --tag ghcr.io/vespa-engine/vespa:$VESPA_VERSION --tag docker.io/vespaengine/$IMAGE_NAME:$VESPA_MAJOR \
+ --tag ghcr.io/vespa-engine/vespa:latest .
fi