Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 105 additions & 77 deletions dev/release/verify-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,95 +181,123 @@ test_binary() {
verify_dir_artifact_signatures ${download_dir}
}

check_verification_result_on_github() {
pushd ${ARROW_TMPDIR}
curl \
--get \
--data "branch=apache-arrow-${VERSION}-rc${RC_NUMBER}" \
"https://api.github.com/repos/apache/arrow/actions/workflows/verify_rc.yml/runs" | \
jq '.workflow_runs[0]' > latest_verify_rc.json
conclusion="$(jq -r '.conclusion' latest_verify_rc.json)"
if [ "${conclusion}" != "success" ]; then
html_url="$(jq -r '.html_url' latest_verify_rc.json)"
echo "Verification on GitHub wasn't successful: ${conclusion}: ${html_url}"
exit 1
fi
popd
}

test_apt() {
show_header "Testing APT packages"

if [ "$(arch)" = "x86_64" ]; then
for target in "debian:bookworm" \
"debian:trixie" \
"ubuntu:jammy" \
"ubuntu:noble"; do \
if ! docker run \
--platform=linux/x86_64 \
--rm \
--security-opt="seccomp=unconfined" \
--volume "${ARROW_DIR}":/arrow:delegated \
"${target}" \
/arrow/dev/release/verify-apt.sh \
"${VERSION}" \
"rc"; then
echo "Failed to verify the APT repository for ${target} on x86_64"
exit 1
fi
done
if [ "${GITHUB_ACTIONS}" != "true" ]; then
check_verification_result_on_github
return 0
fi

if [ "$(arch)" = "aarch64" -o -e /usr/bin/qemu-aarch64-static ]; then
for target in "arm64v8/debian:bookworm" \
"arm64v8/debian:trixie" \
"arm64v8/ubuntu:jammy" \
"arm64v8/ubuntu:noble"; do \
if ! docker run \
--platform=linux/arm64 \
--rm \
--security-opt="seccomp=unconfined" \
--volume "${ARROW_DIR}":/arrow:delegated \
"${target}" \
/arrow/dev/release/verify-apt.sh \
"${VERSION}" \
"rc"; then
echo "Failed to verify the APT repository for ${target} on arm64"
exit 1
fi
done
fi
case "$(arch)" in

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice improvement with the case. Thanks @kou

"x86_64")
for target in "debian:bookworm" \
"debian:trixie" \
"ubuntu:jammy" \
"ubuntu:noble"; do \
if ! docker run \
--platform=linux/x86_64 \
--rm \
--security-opt="seccomp=unconfined" \
--volume "${ARROW_DIR}":/arrow:delegated \
"${target}" \
/arrow/dev/release/verify-apt.sh \
"${VERSION}" \
"rc"; then
echo "Failed to verify the APT repository for ${target} on x86_64"
exit 1
fi
done
;;
"aarch64")
for target in "arm64v8/debian:bookworm" \
"arm64v8/debian:trixie" \
"arm64v8/ubuntu:jammy" \
"arm64v8/ubuntu:noble"; do \
if ! docker run \
--platform=linux/arm64 \
--rm \
--security-opt="seccomp=unconfined" \
--volume "${ARROW_DIR}":/arrow:delegated \
"${target}" \
/arrow/dev/release/verify-apt.sh \
"${VERSION}" \
"rc"; then
echo "Failed to verify the APT repository for ${target} on arm64"
exit 1
fi
done
;;
esac
}

test_yum() {
show_header "Testing Yum packages"

if [ "$(arch)" = "x86_64" ]; then
for target in "almalinux:9" \
"almalinux:8" \
"amazonlinux:2023" \
"quay.io/centos/centos:stream9" \
"quay.io/centos/centos:stream8" \
"centos:7"; do
if ! docker run \
--platform linux/x86_64 \
--rm \
--security-opt="seccomp=unconfined" \
--volume "${ARROW_DIR}":/arrow:delegated \
"${target}" \
/arrow/dev/release/verify-yum.sh \
"${VERSION}" \
"rc"; then
echo "Failed to verify the Yum repository for ${target} on x86_64"
exit 1
fi
done
if [ "${GITHUB_ACTIONS}" != "true" ]; then
check_verification_result_on_github
return 0
fi

if [ "$(arch)" = "aarch64" -o -e /usr/bin/qemu-aarch64-static ]; then
for target in "arm64v8/almalinux:9" \
"arm64v8/almalinux:8" \
"arm64v8/amazonlinux:2023" \
"quay.io/centos/centos:stream9" \
"quay.io/centos/centos:stream8"; do
if ! docker run \
--platform linux/arm64 \
--rm \
--security-opt="seccomp=unconfined" \
--volume "${ARROW_DIR}":/arrow:delegated \
"${target}" \
/arrow/dev/release/verify-yum.sh \
"${VERSION}" \
"rc"; then
echo "Failed to verify the Yum repository for ${target} on arm64"
exit 1
fi
done
fi
case "$(arch)" in
"x86_64")
for target in "almalinux:9" \
"almalinux:8" \
"amazonlinux:2023" \
"quay.io/centos/centos:stream9" \
"quay.io/centos/centos:stream8" \
"centos:7"; do
if ! docker run \
--platform linux/x86_64 \
--rm \
--security-opt="seccomp=unconfined" \
--volume "${ARROW_DIR}":/arrow:delegated \
"${target}" \
/arrow/dev/release/verify-yum.sh \
"${VERSION}" \
"rc"; then
echo "Failed to verify the Yum repository for ${target} on x86_64"
exit 1
fi
done
;;
"aarch64")
for target in "arm64v8/almalinux:9" \
"arm64v8/almalinux:8" \
"arm64v8/amazonlinux:2023" \
"quay.io/centos/centos:stream9" \
"quay.io/centos/centos:stream8"; do
if ! docker run \
--platform linux/arm64 \
--rm \
--security-opt="seccomp=unconfined" \
--volume "${ARROW_DIR}":/arrow:delegated \
"${target}" \
/arrow/dev/release/verify-yum.sh \
"${VERSION}" \
"rc"; then
echo "Failed to verify the Yum repository for ${target} on arm64"
exit 1
fi
done
;;
esac
}

setup_tempdir() {
Expand Down