Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
136 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Target architecture in docker parlance. This is essentially $GOARCH, per the | ||
# manifest spec at https://docs.docker.com/registry/spec/manifest-v2-2/ | ||
# | ||
# The "linux/" OS prefix is assumed. | ||
# | ||
export ARCH=amd64 | ||
|
||
# The advertised variant that will be used in the manifest. | ||
export VARIANT= | ||
|
||
# Generic x86-64 | ||
# | ||
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html | ||
export ARCH_FLAGS=x86-64 | ||
|
||
# The GNU triplet toolchain for cross-compiling to the specified architecture. | ||
# These are specifically "debian multiarch tuples" per https://wiki.debian.org/Multiarch/Tuples | ||
export TOOLCHAIN=x86-64-linux-gnu | ||
export TOOLCHAIN_PREFIX=x86_64-linux-gnu | ||
|
||
# Valid openssl targets are defined in openssl/Configurations/10-main.conf. | ||
export OPENSSL_TARGET=linux-x86_64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./build.sh 2.7 2.7.8 15f2276971bbba8c47d86cc82ebfc6ec33e3aef2e4565058b2e4950c07b8e75c |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
# Automates the production of each release. | ||
|
||
# | ||
# Given a range of haproxy versions, for each version: | ||
# | ||
# * Determine the SHA256 hash of the version | ||
# * Run build.sh with this SHA and version specified | ||
# * Run haproxy -v for each platform to verify success | ||
# * Tag and commit (but no push) | ||
# | ||
|
||
# TODO: do the same for deps, i.e. openssl, pcre2, lua. | ||
|
||
# Usage: release.sh 2.7 4 8 | ||
|
||
if [ $# != 3 ]; then | ||
>&2 echo "usage: $0 <major> <start-version> <end-version>" | ||
exit 1 | ||
fi | ||
|
||
MAJOR=$1 | ||
VERSION_FROM=$2 | ||
VERSION_TO=$3 | ||
DOCKER_PLATFORMS="arm64 amd64" | ||
|
||
if [[ "$(git branch --show-current)" != "$MAJOR" ]]; then | ||
>&2 echo "major version and branch name don't match. wrong branch?" | ||
exit 1 | ||
fi | ||
|
||
set -euo pipefail | ||
|
||
for v in $(seq "$VERSION_FROM" "$VERSION_TO"); do | ||
echo "Running release for $MAJOR.$v" | ||
|
||
sha=$(curl -JLSs "https://www.haproxy.org/download/$MAJOR/src/haproxy-$MAJOR.$v.tar.gz" | sha256sum | awk '{print $1}') | ||
|
||
echo ./build.sh "$MAJOR" "$MAJOR.$v" "$sha" > current-version | ||
./build.sh "$MAJOR" "$MAJOR.$v" "$sha" | ||
|
||
# Verify | ||
for platform in $DOCKER_PLATFORMS; do | ||
docker run --rm "aasmith/haproxy:test-$platform" haproxy -v | grep "$MAJOR.$v" || (echo "failure determining build success for $MAJOR.$v / $platform"; exit 1) | ||
done | ||
|
||
# Commit and tag | ||
git add current-version | ||
git commit -m "Update to $MAJOR.$v." | ||
git tag "$MAJOR.$v" | ||
|
||
done |