diff --git a/docker/Makefile b/docker/Makefile index 5a94ecff8bf..0f810f881f4 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,10 +1,10 @@ VERSION := 1.0.0 ROOT_IMAGE ?= alpine:3.13 -CERT_IMAGE := alpine:3.13 +CERT_IMAGE := $(ROOT_IMAGE) GOLANG_IMAGE := golang:1.15-alpine -BASE_IMAGE := localhost:5000/baseimg:$(VERSION)-$(shell echo $(ROOT_IMAGE) | tr : -) -DEBUG_IMAGE := localhost:5000/debugimg:$(VERSION)-$(shell echo $(GOLANG_IMAGE) | tr : -) +BASE_IMAGE := localhost:5000/baseimg_alpine:latest +DEBUG_IMAGE := localhost:5000/debugimg_alpine:latest PLATFORMS := linux/amd64,linux/s390x create-baseimg-debugimg: create-baseimg create-debugimg diff --git a/scripts/build-all-in-one-image.sh b/scripts/build-all-in-one-image.sh index 5f2b37bc482..b03cd0f65fd 100755 --- a/scripts/build-all-in-one-image.sh +++ b/scripts/build-all-in-one-image.sh @@ -40,7 +40,7 @@ make build-all-in-one GOOS=linux GOARCH=amd64 make build-all-in-one GOOS=linux GOARCH=s390x platforms="linux/amd64,linux/s390x" repo=jaegertracing/all-in-one -base_debug_img_arg="--build-arg base_image=localhost:5000/baseimg:1.0.0-alpine-3.13 --build-arg debug_image=golang:1.15-alpine " +base_debug_img_arg="--build-arg base_image=localhost:5000/baseimg_alpine:latest --build-arg debug_image=golang:1.15-alpine " #build all-in-one image locally for integration test bash scripts/build-upload-a-docker-image.sh -l -c all-in-one -b "${base_debug_img_arg}" -d cmd/all-in-one -p "${platforms}" -t release run_integration_test localhost:5000/$repo @@ -50,7 +50,7 @@ bash scripts/build-upload-a-docker-image.sh -c all-in-one -b "${base_debug_img_a make build-all-in-one-debug GOOS=linux GOARCH=$GOARCH repo=${repo}-debug -base_debug_img_arg="--build-arg base_image=localhost:5000/baseimg:1.0.0-alpine-3.13 --build-arg debug_image=localhost:5000/debugimg:1.0.0-golang-1.15-alpine " +base_debug_img_arg="--build-arg base_image=localhost:5000/baseimg_alpine:latest --build-arg debug_image=localhost:5000/debugimg_alpine:latest " #build all-in-one-debug image locally for integration test bash scripts/build-upload-a-docker-image.sh -l -c all-in-one-debug -b "${base_debug_img_arg}" -d cmd/all-in-one -t debug run_integration_test localhost:5000/$repo diff --git a/scripts/build-crossdock.sh b/scripts/build-crossdock.sh index 7a6a9707613..ae627172586 100755 --- a/scripts/build-crossdock.sh +++ b/scripts/build-crossdock.sh @@ -10,16 +10,13 @@ make build-and-run-crossdock # Only push images to dockerhub/quay.io for master branch if [[ "$BRANCH" == "master" ]]; then echo 'upload images to dockerhub/quay.io' - make build-crossdock-binary GOOS=linux GOARCH=amd64 - make build-crossdock-binary GOOS=linux GOARCH=s390x - PLATFORMS="linux/amd64,linux/s390x" REPO=jaegertracing/test-driver IMAGE_TAGS=$(bash scripts/compute-tags.sh $REPO) IMAGE_TAGS="${IMAGE_TAGS} --tag docker.io/${REPO}:${COMMIT} --tag quay.io/${REPO}:${COMMIT}" bash scripts/docker-login.sh docker buildx build --push \ --progress=plain \ - --platform=$PLATFORMS \ + --platform=linux/amd64 \ ${IMAGE_TAGS} \ crossdock/ else diff --git a/scripts/build-upload-docker-images.sh b/scripts/build-upload-docker-images.sh index acb7e3b6558..ff712548571 100644 --- a/scripts/build-upload-docker-images.sh +++ b/scripts/build-upload-docker-images.sh @@ -9,7 +9,7 @@ make build-binaries-linux make build-binaries-s390x platforms="linux/amd64,linux/s390x" -base_debug_img_arg="--build-arg base_image=localhost:5000/baseimg:1.0.0-alpine-3.13 --build-arg debug_image=golang:1.15-alpine " +base_debug_img_arg="--build-arg base_image=localhost:5000/baseimg_alpine:latest --build-arg debug_image=golang:1.15-alpine " # build/upload images for release version of Jaeger backend components for component in agent collector query ingester @@ -30,7 +30,7 @@ done # build amd64 docker images platforms="linux/amd64" -base_debug_img_arg="--build-arg base_image=localhost:5000/baseimg:1.0.0-alpine-3.13 --build-arg debug_image=localhost:5000/debugimg:1.0.0-golang-1.15-alpine " +base_debug_img_arg="--build-arg base_image=localhost:5000/baseimg_alpine:latest --build-arg debug_image=localhost:5000/debugimg_alpine:latest " # build/upload images for debug version of Jaeger backend components for component in agent collector query ingester diff --git a/scripts/compute-tags.sh b/scripts/compute-tags.sh index 6692b52f1d3..342e3c70b3f 100644 --- a/scripts/compute-tags.sh +++ b/scripts/compute-tags.sh @@ -1,9 +1,11 @@ #!/bin/bash +# Compute major/minor/etc image tags based on the current branch + set -exu -# Compute the tag BASE_BUILD_IMAGE=$1 +BRANCH=${BRANCH:?'expecting BRANCH env var'} ## if we are on a release tag, let's extract the version number ## the other possible value, currently, is 'master' (or another branch name)