This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 61b50dc ARROW-4257: [Release] Update release verification script to
check binaries on Bintray
61b50dc is described below
commit 61b50dcbd905c6c699a44a2b8e0206c28df38e7d
Author: Kouhei Sutou <[email protected]>
AuthorDate: Mon Jan 14 23:41:30 2019 -0600
ARROW-4257: [Release] Update release verification script to check binaries
on Bintray
You need to set the `BINTRAY_PASSWORD` environment variable to run this.
If you use different user name with `$USER` on Bintray, you also need to
set the `BINTRAY_USER` environment variable.
Author: Kouhei Sutou <[email protected]>
Closes #3397 from kou/release-verify-script-support-binary and squashes the
following commits:
4e8df1358 <Kouhei Sutou> Update release verification script to check
binaries on Bintray
---
dev/release/verify-release-candidate.sh | 77 +++++++++++++++++++++++++--------
1 file changed, 60 insertions(+), 17 deletions(-)
diff --git a/dev/release/verify-release-candidate.sh
b/dev/release/verify-release-candidate.sh
index c8b9c54..28fb1e5 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -87,24 +87,56 @@ fetch_archive() {
shasum -a 512 -c ${dist_name}.tar.gz.sha512
}
+bintray() {
+ local command=$1
+ shift
+ local path=$1
+ shift
+ local url=https://bintray.com/api/v1${path}
+ echo "${command} ${url}" 1>&2
+ curl \
+ --fail \
+ --basic \
+ --user "${BINTRAY_USER}:${BINTRAY_PASSWORD}" \
+ --header "Content-Type: application/json" \
+ --request ${command} \
+ ${url} \
+ "$@" | \
+ jq .
+}
+
+download_bintray_files() {
+ local target=$1
+
+ local version_name=${VERSION}-rc${RC_NUMBER}
+
+ local files=$(
+ bintray \
+ GET
/packages/${BINTRAY_REPOSITORY}/${target}-rc/versions/${version_name}/files | \
+ jq -r ".[].path")
+
+ for file in ${files}; do
+ mkdir -p "$(dirname ${file})"
+ curl \
+ --fail \
+ --location \
+ --output ${file} \
+ https://dl.bintray.com/${BINTRAY_REPOSITORY}/${file}
+ done
+}
+
verify_binary_artifacts() {
- # --show-progress not supported on wget < 1.16
- wget --help | grep -q '\--show-progress' && \
- _WGET_PROGRESS_OPT="-q --show-progress" || _WGET_PROGRESS_OPT=""
-
- # download the binaries folder for the current RC
- rcname=apache-arrow-${VERSION}-rc${RC_NUMBER}
- wget -P "$rcname" \
- --quiet \
- --no-host-directories \
- --cut-dirs=5 \
- $_WGET_PROGRESS_OPT \
- --no-parent \
- --reject 'index.html*' \
- --recursive "$ARROW_DIST_URL/$rcname/binaries/"
+ local download_dir=binaries
+ mkdir -p ${download_dir}
+ pushd ${download_dir}
+
+ # takes longer on slow network
+ for target in centos debian python ubuntu; do
+ download_bintray_files ${target}
+ done
# verify the signature and the checksums of each artifact
- find $rcname/binaries -name '*.asc' | while read sigfile; do
+ find . -name '*.asc' | while read sigfile; do
artifact=${sigfile/.asc/}
gpg --verify $sigfile $artifact || exit 1
@@ -112,10 +144,14 @@ verify_binary_artifacts() {
# basename of the artifact
pushd $(dirname $artifact)
base_artifact=$(basename $artifact)
- shasum -a 256 -c $base_artifact.sha256 || exit 1
+ if [ -f $base_artifact.sha256 ]; then
+ shasum -a 256 -c $base_artifact.sha256 || exit 1
+ fi
shasum -a 512 -c $base_artifact.sha512 || exit 1
popd
done
+
+ popd
}
setup_tempdir() {
@@ -343,7 +379,14 @@ if [ "$ARTIFACT" == "source" ]; then
test_integration
test_rust
else
- # takes longer on slow network
+ if [ -z "${BINTRAY_PASSWORD}" ]; then
+ echo "BINTRAY_PASSWORD is empty"
+ exit 1
+ fi
+
+ : ${BINTRAY_USER:=$USER}
+ : ${BINTRAY_REPOSITORY:=apache/arrow}
+
verify_binary_artifacts
fi