mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
Fixes https://github.com/certbot/certbot/issues/8208.
Fixes https://github.com/certbot/certbot/issues/8198.
In addition to those two linked issues, this PR:
* Splits both the build and deploy steps based on architecture for performance. The Docker builds should no longer be the bottleneck in any stage of the pipeline.
* Skips building Docker images for ARM on `test-` branches like [we do for snaps](e8a232297d/.azure-pipelines/templates/jobs/packaging-jobs.yml (L67-L71)). I initially didn't want to do this, but the ARM builds take ~18 minutes which is significantly longer than any other job currently running on our `test-` branches.
You can see tests running on my fork at:
* [Release pipeline](https://dev.azure.com/bmw0523/bmw/_build/results?buildId=387&view=results)
* [Test pipeline](https://dev.azure.com/bmw0523/bmw/_build/results?buildId=388&view=results)
* [Nightly pipeline](https://dev.azure.com/bmw0523/bmw/_build/results?buildId=390&view=results)
* update script intro
* update readme
* ParseRequestedArch
* build all arch in Azure
* Build docker images during testing/packaging.
* require global variable?
* Error if TAG_BASE is empty.
* prepare build job
* change variable syntax
* Update deploy stage.
* remove old dockerTag param
* add displayName
* fix docker images command
* split docker_build by arch
* Allow deploying a subset of architectures.
* deploy in parallel
* Skip ARM builds on test- branches.
* fix spacing
54 lines
1.6 KiB
Bash
54 lines
1.6 KiB
Bash
#!/bin/bash
|
|
set -ex
|
|
|
|
# Current supported architectures
|
|
export ALL_TARGET_ARCH=(amd64 arm32v6 arm64v8)
|
|
|
|
# Architecture used in tags with no architecture specified (certbot/certbot:latest, certbot/certbot:v0.35.0, ...)
|
|
export DEFAULT_ARCH=amd64
|
|
|
|
# Name of the Certbot Docker organizaation on GitHub. After creating
|
|
# repositories with the same names (e.g. "certbot", "dns-dnsmadeeasy", etc.)
|
|
# using a different account on Docker Hub, you can change this value to have
|
|
# the scripts modify those Docker repositories rather than the repositories for
|
|
# the official Certbot Docker images.
|
|
export DOCKER_HUB_ORG="certbot"
|
|
|
|
# List of Certbot plugins
|
|
export CERTBOT_PLUGINS=(
|
|
"dns-dnsmadeeasy"
|
|
"dns-dnsimple"
|
|
"dns-ovh"
|
|
"dns-cloudflare"
|
|
"dns-cloudxns"
|
|
"dns-digitalocean"
|
|
"dns-google"
|
|
"dns-luadns"
|
|
"dns-nsone"
|
|
"dns-rfc2136"
|
|
"dns-route53"
|
|
"dns-gehirn"
|
|
"dns-linode"
|
|
"dns-sakuracloud"
|
|
)
|
|
|
|
# Parses the requested architecture string and sets ALL_REQUESTED_ARCH to
|
|
# result.
|
|
# Usage: ParseRequestedArch [all|amd64|arm32v6|arm64v8]
|
|
ParseRequestedArch() {
|
|
REQUESTED_ARCH="${1}"
|
|
if [[ "${REQUESTED_ARCH}" == "all" ]]; then
|
|
ALL_REQUESTED_ARCH=("${ALL_TARGET_ARCH[@]}")
|
|
return 0
|
|
fi
|
|
for TARGET_ARCH in "${ALL_TARGET_ARCH[@]}"; do
|
|
if [[ "${TARGET_ARCH}" == "${REQUESTED_ARCH}" ]]; then
|
|
ALL_REQUESTED_ARCH=("${REQUESTED_ARCH}")
|
|
return 0
|
|
fi
|
|
done
|
|
# If we didn't return above, REQUESTED_ARCH has an unexpected value.
|
|
echo "Unexpected target architecture \"${REQUESTED_ARCH}\"". >&2
|
|
exit 1
|
|
}
|