From accee9747668f1bc4e4130f1c7eb1fe27bdce026 Mon Sep 17 00:00:00 2001 From: humanoid2050 Date: Mon, 6 Mar 2023 18:39:25 -0500 Subject: [PATCH] bugfixes --- tools/docker/README.md | 22 +++++++++++----------- tools/docker/build.sh | 2 +- tools/docker/deploy.sh | 16 ++++++++++------ tools/docker/test.sh | 14 +++++++------- 4 files changed, 29 insertions(+), 25 deletions(-) mode change 100644 => 100755 tools/docker/deploy.sh diff --git a/tools/docker/README.md b/tools/docker/README.md index ba1ab0840..9ea489697 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -20,21 +20,21 @@ DNS plugin Docker images to Docker Hub. High-level behavior ------------------- -Running `./build.sh all` causes the Docker images to be built for all -supported architectures, where `` is the base of the tag that should be -given to the generated images. The tag should either be `nightly` or a git -version tag like `v2.2.0`. For version tags above `v2.0.0`, additional tags -for `latest` are also generated. The generated images are stored in a local +Running `./build.sh all` causes the Docker images to be built for all +supported architectures. The generated images are stored in a docker cache backed by the local filesystem. -Running `./test.sh all` either loads images from the filesystem cache -or generates said images on demand, loads them into the local docker cache, -and runs a test command to validate the image contents. +Running `./test.sh all` either loads images from the filesystem cache +or generates said images on demand, and runs a test command to validate +the image contents. Running `./deploy.sh all` will push the previously generated images -to Docker Hub. The per-architecture images are accessible through the -corresponding multi-arch manifest by using the `docker pull --platform - :` command. +to Docker Hub. The argument is an identifier applied to all docker +images and manifests. it may be something like `nightly` or `v2.3.2`. If +the tag is a version stamp greater than v2.0.0, then a `latest` tag will +also be generated and pushed to the docker hub repo. The per-architecture +images are accessible through the corresponding multi-arch manifest by +using the `docker pull --platform :` command. Configuration ------------- diff --git a/tools/docker/build.sh b/tools/docker/build.sh index 876e80568..5d0141b85 100755 --- a/tools/docker/build.sh +++ b/tools/docker/build.sh @@ -14,7 +14,7 @@ set -euxo pipefail source "$(realpath $(dirname ${BASH_SOURCE[0]}))/lib/common" -REQUESTED_ARCH_LIST=$(InterpretArchRequest "$2") +REQUESTED_ARCH_LIST=$(InterpretArchRequest "$1") PLATFORM_SPEC=$(archList2platformList "${REQUESTED_ARCH_LIST[@]}") #jump to root, matching popd handed by Cleanup on EXIT via trap diff --git a/tools/docker/deploy.sh b/tools/docker/deploy.sh old mode 100644 new mode 100755 index f8443b1ae..bb0223c38 --- a/tools/docker/deploy.sh +++ b/tools/docker/deploy.sh @@ -4,12 +4,16 @@ set -euxo pipefail # This script builds certbot docker and certbot dns plugins docker using the # local Certbot files. -# Usage: ./deploy.sh [TAG] [all|] -# with the [TAG] value corresponding the base of the tag to give the Docker -# images and the 2nd value being the architecture to build snaps for. -# Values for the tag should be something like `v0.34.0` or `nightly`. The -# given value is only the base of the tag because the things like the CPU -# architecture are also added to the full tag. +# Usage: +# ./deploy.sh all +# ./deploy.sh +# The argument is an identifier applied to all docker images and manifests. +# It may be something like `nightly` or `v2.3.2`. If the tag is a version +# stamp greater than v2.0.0, then a `latest` tag will also be generated and +# pushed to the docker hub repo. +# The argument "all" will build all know architectures. Alternatively, the +# user may provide a comma separated list of architectures drawn from the +# known architectures. Know architectures include amd64, arm32v6, and arm64v8. source "$(realpath $(dirname ${BASH_SOURCE[0]}))/lib/common" diff --git a/tools/docker/test.sh b/tools/docker/test.sh index 6e32b833c..52d5328e4 100755 --- a/tools/docker/test.sh +++ b/tools/docker/test.sh @@ -3,16 +3,16 @@ set -euxo pipefail # This script tests certbot docker and certbot dns plugin images. -# Usage: ./test.sh [TAG] [all|] -# with the [TAG] value corresponding the base of the tag to give the Docker -# images and the 2nd value being the architecture to build snaps for. -# Values for the tag should be something like `v0.34.0` or `nightly`. The -# given value is only the base of the tag because the things like the CPU -# architecture are also added to the full tag. +# Usage: +# ./test.sh all +# ./test.sh +# The argument "all" will build all know architectures. Alternatively, the +# user may provide a comma separated list of architectures drawn from the +# known architectures. Know architectures include amd64, arm32v6, and arm64v8. source "$(realpath $(dirname ${BASH_SOURCE[0]}))/lib/common" -REQUESTED_ARCH_LIST=$(InterpretArchRequest "$2") +REQUESTED_ARCH_LIST=$(InterpretArchRequest "$1") #jump to root, matching popd handed by Cleanup on EXIT via trap pushd "${REPO_ROOT}"