Skip to content

Commit

Permalink
trial and error
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrdrew committed Nov 7, 2023
1 parent ee74814 commit f7cfd27
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mkdir -p "$DOCKER_CONF"
docker buildx inspect --builder multiarchbuilder --bootstrap

docker buildx ls

docker buildx use multiarchbuilder

docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io
docker --config="$DOCKER_CONF" login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io
Expand All @@ -38,8 +38,8 @@ echo "received HTTP response: $RESPONSE"
VALID_TAGS_LENGTH=$(echo $RESPONSE | jq '[ .tags[] | select(.end_ts == null) ] | length')

if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then
docker --config="$DOCKER_CONF" buildx --builder multiarchbuilder build --platform linux/amd64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push .
docker --config="$DOCKER_CONF" buildx --builder multiarchbuilder build --platform linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-arm64" --push .
docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push .
docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-arm64" --push .
docker --config="$DOCKER_CONF" manifest create "${BASE_IMG}" \
"${BASE_IMG}-amd64" \
"${BASE_IMG}-arm64"
Expand All @@ -48,8 +48,8 @@ fi
#### End


docker --config="$DOCKER_CONF" buildx --builder multiarchbuilder build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push .
docker --config="$DOCKER_CONF" buildx --builder multiarchbuilder build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push .
docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push .
docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push .

docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \
"${IMAGE}:${IMAGE_TAG}-amd64" \
Expand Down

0 comments on commit f7cfd27

Please sign in to comment.