aboutsummaryrefslogtreecommitdiffstats
path: root/screwdriver
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@yahooinc.com>2023-03-20 14:23:04 +0100
committerArnstein Ressem <aressem@yahooinc.com>2023-03-21 09:31:21 +0100
commit92a42bcd19c8bfb0e245eaeb47c1d5013ede41c1 (patch)
treecf9a20c90d7a29145343dfdd1170bf62ea01eb9a /screwdriver
parent829f4a279b817b01144c5896de1a5c671804857d (diff)
Switch to podman
Diffstat (limited to 'screwdriver')
-rwxr-xr-xscrewdriver/release-container-image.sh43
1 files changed, 20 insertions, 23 deletions
diff --git a/screwdriver/release-container-image.sh b/screwdriver/release-container-image.sh
index a2a56313fb5..78a21251f17 100755
--- a/screwdriver/release-container-image.sh
+++ b/screwdriver/release-container-image.sh
@@ -37,18 +37,6 @@ else
git push origin "$RELEASE_TAG"
fi
-docker info
-docker version
-docker buildx version
-docker buildx install
-
-unset DOCKER_HOST
-docker context create vespa-context --docker "host=tcp://localhost:2376,ca=/certs/client/ca.pem,cert=/certs/client/cert.pem,key=/certs/client/key.pem"
-docker context use vespa-context
-
-docker buildx create --name vespa-builder --driver docker-container --use
-docker buildx inspect --bootstrap
-
#The minimal image seem to have issues building on cd.screwdriver.cd. Needs investigation.
#for data in "Dockerfile vespa" "Dockerfile.minimal vespa-minimal"; do
@@ -61,15 +49,24 @@ for data in "Dockerfile vespa"; do
if curl -fsSL https://index.docker.io/v1/repositories/vespaengine/$IMAGE_NAME/tags/$VESPA_VERSION &> /dev/null; then
echo "Container image docker.io/vespaengine/$IMAGE_NAME:$VESPA_VERSION aldready exists."
else
- # Build the image and run through the quick start guide
- docker buildx build --progress plain --load --platform linux/amd64 --build-arg VESPA_VERSION=$VESPA_VERSION \
- --file $DOCKER_FILE --tag vespaengine/$IMAGE_NAME:latest .
+ # Build
+ buildah bud \
+ --build-arg VESPA_VERSION=$VESPA_VERSION \
+ --file $DOCKER_FILE \
+ --jobs 2 \
+ --layers=false \
+ --manifest "vespaengine/$IMAGE_NAME:$VESPA_VERSION" \
+ --platform linux/amd64,linux/arm64 | cat
+
+ # Test
+ buildah tag vespaengine/$IMAGE_NAME:$VESPA_VERSION vespaengine/$IMAGE_NAME:latest
$SD_SOURCE_DIR/screwdriver/test-quick-start-guide.sh
- 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:$VESPA_MAJOR --tag docker.io/vespaengine/$IMAGE_NAME:latest .
+ # Publish
+ buildah login --username aressem --password "$DOCKER_HUB_DEPLOY_KEY"
+ buildah manifest push --all --format v2s2 vespaengine/$IMAGE_NAME:$VESPA_VERSION docker://docker.io/vespaengine/$IMAGE_NAME:$VESPA_VERSION | cat
+ buildah manifest push --all --format v2s2 vespaengine/$IMAGE_NAME:$VESPA_VERSION docker://docker.io/vespaengine/$IMAGE_NAME:$VESPA_MAJOR | cat
+ buildah manifest push --all --format v2s2 vespaengine/$IMAGE_NAME:$VESPA_VERSION docker://docker.io/vespaengine/$IMAGE_NAME:latest | cat
fi
done
@@ -79,8 +76,8 @@ IMAGE_TAGS=$(curl -sSL -H "Authorization: Bearer $JWT" https://ghcr.io/v2/vespa-
if grep $VESPA_VERSION <<< "$IMAGE_TAGS" &> /dev/null; then
echo "Container image ghcr.io/vespa-engine/vespa:$VESPA_VERSION aldready exists."
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:$VESPA_MAJOR \
- --tag ghcr.io/vespa-engine/vespa:latest .
+ buildah login --username aressem --password "$GHCR_DEPLOY_KEY" ghcr.io
+ skopeo --insecure-policy copy --retry-times 5 --all --format v2s2 docker://docker.io/vespaengine/$IMAGE_NAME:$VESPA_VERSION docker://ghcr.io/vespaengine/vespa:$VESPA_VERSION
+ skopeo --insecure-policy copy --retry-times 5 --all --format v2s2 docker://docker.io/vespaengine/$IMAGE_NAME:$VESPA_VERSION docker://ghcr.io/vespaengine/vespa:$VESPA_MAJOR
+ skopeo --insecure-policy copy --retry-times 5 --all --format v2s2 docker://docker.io/vespaengine/$IMAGE_NAME:$VESPA_VERSION docker://ghcr.io/vespaengine/vespa:latest
fi