mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-12-02 19:40:35 +08:00
- Add build/ci to build the archives of an annotated release tag - Run it on the large_linux_arm Buildkite queue - Keep the archives as artifacts and show checksums in an annotation - Pass --load to docker, as a remote builder keeps the image in its cache - Add build/fetch to download the archives of the CI release job - Pick the job by its step key, so a failed test elsewhere does not hide it - Add build/compare to check a build against another - Document the CI build, the download and the comparison
46 lines
1.2 KiB
Bash
Executable File
46 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
# Builds the release archives in Buildkite, from a `releases/httpd/<version>`
|
|
# tag. garden-broker passes the tag name as BUILDKITE_BRANCH and the tag object
|
|
# as BUILDKITE_COMMIT; Buildkite sets no BUILDKITE_TAG.
|
|
|
|
tag="$BUILDKITE_BRANCH"
|
|
|
|
case "$tag" in
|
|
releases/httpd/*) ;;
|
|
*)
|
|
echo "fatal: '$tag' is not a releases/httpd/<version> tag" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# Reject a branch that only has the name of a release tag.
|
|
if [ "$(git cat-file -t "$BUILDKITE_COMMIT")" != tag ]; then
|
|
echo "fatal: $BUILDKITE_COMMIT is not an annotated tag" >&2
|
|
exit 1
|
|
fi
|
|
name="$(git cat-file tag "$BUILDKITE_COMMIT" | sed -n 's/^tag //p')"
|
|
if [ "$name" != "$tag" ]; then
|
|
echo "fatal: tag object $BUILDKITE_COMMIT is named '$name', not '$tag'" >&2
|
|
exit 1
|
|
fi
|
|
|
|
version="${tag#releases/httpd/}"
|
|
if ! echo "$version" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$'; then
|
|
echo "fatal: '$version' is not a MAJOR.MINOR.PATCH version" >&2
|
|
exit 1
|
|
fi
|
|
export RADICLE_HTTPD_VERSION="$version"
|
|
|
|
CONTAINER=docker "$(dirname "$0")/build"
|
|
|
|
checksums="$("$(dirname "$0")/checksums" | sort -k2)"
|
|
buildkite-agent annotate --style info --context httpd-release <<EOF
|
|
radicle-httpd + radicle-search $version
|
|
|
|
\`\`\`
|
|
$checksums
|
|
\`\`\`
|
|
EOF
|