github.com/letsencrypt/boulder@v0.20251208.0/test/boulder-tools/tag_and_upload.sh (about) 1 #!/bin/bash 2 3 set -feuxo pipefail 4 5 cd $(dirname $0) 6 7 DATESTAMP=$(date +%Y-%m-%d) 8 DOCKER_REPO="letsencrypt/boulder-tools" 9 10 # These versions are only built for platforms that we run in CI. 11 # When updating these GO_CI_VERSIONS, please also update 12 # .github/workflows/release.yml, 13 # .github/workflows/try-release.yml if appropriate, 14 # and .github/workflows/boulder-ci.yml with the new container tag. 15 GO_CI_VERSIONS=( "1.25.5" ) 16 17 echo "Please login to allow push to DockerHub" 18 docker login 19 20 # Usage: build_and_push_image $GO_VERSION 21 build_and_push_image() { 22 GO_VERSION="$1" 23 TAG_NAME="${DOCKER_REPO}:go${GO_VERSION}_${DATESTAMP}" 24 echo "Building boulder-tools image ${TAG_NAME}" 25 26 # build, tag, and push the image. 27 docker buildx build \ 28 --build-arg "GO_VERSION=${GO_VERSION}" \ 29 --progress plain \ 30 --push \ 31 --tag "${TAG_NAME}" \ 32 --platform "linux/amd64" \ 33 . 34 } 35 36 for GO_VERSION in "${GO_CI_VERSIONS[@]}" 37 do 38 build_and_push_image $GO_VERSION 39 done