diff --git a/.scripts/upload_new_kcat_version.sh b/.scripts/upload_new_kcat_version.sh deleted file mode 100755 index 5915d8858..000000000 --- a/.scripts/upload_new_kcat_version.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - - -# kcat does not currently publish signatures or SBOMs -# renaming binary because original file name has no version -echo "Downloading kcat" -curl --fail -Ls -o "kcat-$VERSION.tar.gz" "https://github.com/edenhill/kcat/archive/refs/tags/$VERSION.tar.gz" - -echo "Uploading to Nexus" -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "kcat-$VERSION.tar.gz" 'https://repo.stackable.tech/repository/packages/kcat/' - - -echo "Successfully uploaded new version of kcat ($VERSION) to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/kcat/" diff --git a/druid/upload_new_druid_version.sh b/druid/upload_new_druid_version.sh deleted file mode 100755 index 0a3a0929e..000000000 --- a/druid/upload_new_druid_version.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -# We prefer fast downloads... -BASE_DOWNLOAD_URL="https://dlcdn.apache.org/druid" -# However, if the version is not available, use the slow archive instead: -# BASE_DOWNLOAD_URL="https://archive.apache.org/dist/druid" - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -src_file="apache-druid-${VERSION}-src.tar.gz" - -echo "Downloading Druid source (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/${VERSION}/${src_file}" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/${VERSION}/${src_file}.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/${VERSION}/${src_file}.sha512" - -# It is probably redundant to check both the checksum and the signature but it's cheap and why not -echo "Validating SHA512 Checksum" -if ! (sha512sum "${src_file}" | cut -d " " -f 1 | diff -Z - "${src_file}.sha512"); then - echo "ERROR: The SHA512 sum does not match" - exit 1 -fi - -echo "Validating signature" -if ! (gpg --verify "${src_file}.asc" "${src_file}" 2> /dev/null); then - echo "ERROR: The signature could not be verified" - echo "--> Make sure you have imported the KEYS file (${BASE_DOWNLOAD_URL}/KEYS) into GPG: https://www.apache.org/info/verification.html" - echo "--> e.g. \"curl ${BASE_DOWNLOAD_URL}/KEYS | gpg --import\"" - exit 1 -fi - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}" 'https://repo.stackable.tech/repository/packages/druid/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}.asc" 'https://repo.stackable.tech/repository/packages/druid/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}.sha512" 'https://repo.stackable.tech/repository/packages/druid/' || EXIT_STATUS=$? - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version ${VERSION} of Druid to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/druid/" diff --git a/hadoop/upload_new_hadoop_version.sh b/hadoop/upload_new_hadoop_version.sh deleted file mode 100755 index 9c390c967..000000000 --- a/hadoop/upload_new_hadoop_version.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -# We prefer fast downloads... -BASE_DOWNLOAD_URL="https://dlcdn.apache.org/hadoop/common" -# However, if the version is not available, use the slow archive instead: -# BASE_DOWNLOAD_URL="https://archive.apache.org/dist/hadoop/common" - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -bin_file=hadoop-$VERSION.tar.gz -src_file=hadoop-$VERSION-src.tar.gz - -echo "Downloading Hadoop binary (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hadoop-$VERSION/$bin_file" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hadoop-$VERSION/$bin_file.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hadoop-$VERSION/$bin_file.sha512" - -echo "Downloading Hadoop source (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hadoop-$VERSION/$src_file" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hadoop-$VERSION/$src_file.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hadoop-$VERSION/$src_file.sha512" - -# It is probably redundant to check both the checksum and the signature but it's cheap and why not -echo "Validating SHA512 Checksums" -if ! (sha512sum --tag "$bin_file" | diff - "$bin_file.sha512" && sha512sum --tag "$src_file" | diff - "$src_file.sha512"); then - echo "ERROR: One of the SHA512 sums does not match" - echo "NOTE: Hadoop 3.2.2 is the only version I could find that uses a different SHA file format, this will fail here, please upload it manually" - exit 1 -fi - -echo "Validating signatures" -if ! (gpg --verify "$bin_file.asc" "$bin_file" 2> /dev/null && gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then - echo "ERROR: One of the signatures could not be verified" - echo "--> Make sure you have imported the KEYS file (${BASE_DOWNLOAD_URL}/KEYS) into GPG: https://www.apache.org/info/verification.html" - echo "--> e.g. \"curl ${BASE_DOWNLOAD_URL}/KEYS | gpg --import\"" - exit 1 -fi - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$bin_file" 'https://repo.stackable.tech/repository/packages/hadoop/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$bin_file.asc" 'https://repo.stackable.tech/repository/packages/hadoop/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$bin_file.sha512" 'https://repo.stackable.tech/repository/packages/hadoop/' || EXIT_STATUS=$? - -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file" 'https://repo.stackable.tech/repository/packages/hadoop/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.asc" 'https://repo.stackable.tech/repository/packages/hadoop/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.sha512" 'https://repo.stackable.tech/repository/packages/hadoop/' || EXIT_STATUS=$? - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version $VERSION of Hadoop to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/hadoop/" diff --git a/hbase/README.md b/hbase/README.md index c69869715..fcdd00ae3 100644 --- a/hbase/README.md +++ b/hbase/README.md @@ -4,27 +4,8 @@ As of SDP 24.7 we do include HBase 2.6 support in an experimental state. ## Phoenix -At the time of this writing (July 12, 2024) there is no Phoenix release that supports HBase 2.6 so the script `upload_new_phoenix_version.sh` will not work. - -HBase 2.6 support [was added](https://github.com/apache/phoenix/pull/1793) with [PHOENIX-7172](https://issues.apache.org/jira/browse/PHOENIX-7172). -SDP 24.7 includes Phoenix built from the master branch from commit [4afe457](https://github.com/apache/phoenix/tree/4afe4579bb3ab01725e4939746d0b7b807b438ac). - -```bash -# clone the Phoenix repo -git clone git@github.com:apache/phoenix.git -cd phoenix -git checkout 4afe457 - -# create a tarball -mkdir ../phoenix-5.3.0-4afe457 -git archive --format=tar --output ../phoenix-5.3.0-4afe457/phoenix.tar 4afe457 -cd ../phoenix-5.3.0-4afe457 -tar xf phoenix.tar -rm phoenix.tar -echo 4afe457 > git-commit -cd .. -tar -c phoenix-5.3.0-4afe457 | gzip > phoenix-5.3.0-4afe457-src.tar.gz -``` +HBase 2.6 support [was added](https://github.com/apache/phoenix/pull/1793) with [PHOENIX-7172](https://issues.apache.org/jira/browse/PHOENIX-7172) and released with Phoenix 5.2.1, which is included since SDP 25.3. +SDP 24.7 included Phoenix built from the master branch from commit [4afe457](https://github.com/apache/phoenix/tree/4afe4579bb3ab01725e4939746d0b7b807b438ac). ## HBase operator tools diff --git a/hbase/upload_new_hbase-operator-tools_version.sh b/hbase/upload_new_hbase-operator-tools_version.sh deleted file mode 100755 index aa33a3379..000000000 --- a/hbase/upload_new_hbase-operator-tools_version.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -# We prefer fast downloads... -BASE_DOWNLOAD_URL="https://dlcdn.apache.org/hbase" -# However, if the version is not available, use the slow archive instead: -# BASE_DOWNLOAD_URL="https://archive.apache.org/dist/hbase" - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -src_file=hbase-operator-tools-$VERSION-src.tar.gz - -echo "Downloading hbase-operator-tools source (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hbase-operator-tools-$VERSION/$src_file" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hbase-operator-tools-$VERSION/$src_file.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hbase-operator-tools-$VERSION/$src_file.sha512" - -# It is probably redundant to check both the checksum and the signature but it's cheap and why not -echo "Validating SHA512 Checksums" -if ! (gpg --print-md SHA512 "$src_file" | diff - "$src_file.sha512"); then - echo "ERROR: One of the SHA512 sums does not match" - exit 1 -fi - -echo "Validating signatures" -if ! (gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then - echo "ERROR: One of the signatures could not be verified" - echo "--> Make sure you have imported the KEYS file (${BASE_DOWNLOAD_URL}/KEYS) into GPG: https://www.apache.org/info/verification.html" - echo "--> e.g. \"curl ${BASE_DOWNLOAD_URL}/KEYS | gpg --import\"" - exit 1 -fi - - - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file" 'https://repo.stackable.tech/repository/packages/hbase-operator-tools/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.asc" 'https://repo.stackable.tech/repository/packages/hbase-operator-tools/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.sha512" 'https://repo.stackable.tech/repository/packages/hbase-operator-tools/' || EXIT_STATUS=$? - - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version $VERSION of hbase-operator-tools to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/hbase-operator-tools/" diff --git a/hbase/upload_new_hbase_version.sh b/hbase/upload_new_hbase_version.sh deleted file mode 100755 index 9b0c9ceef..000000000 --- a/hbase/upload_new_hbase_version.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -# We prefer fast downloads... -BASE_DOWNLOAD_URL="https://dlcdn.apache.org/hbase" -# However, if the version is not available, use the slow archive instead: -# BASE_DOWNLOAD_URL="https://archive.apache.org/dist/hbase" - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -src_file=hbase-$VERSION-src.tar.gz - -echo "Downloading HBase source (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/$VERSION/$src_file" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/$VERSION/$src_file.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/$VERSION/$src_file.sha512" - -# It is probably redundant to check both the checksum and the signature but it's cheap and why not -echo "Validating SHA512 Checksums" -if ! (gpg --print-md SHA512 "$src_file" | diff - "$src_file.sha512"); then - echo "ERROR: One of the SHA512 sums does not match" - exit 1 -fi - -echo "Validating signatures" -if ! (gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then - echo "ERROR: One of the signatures could not be verified" - echo "--> Make sure you have imported the KEYS file (${BASE_DOWNLOAD_URL}/KEYS) into GPG: https://www.apache.org/info/verification.html" - echo "--> e.g. \"curl ${BASE_DOWNLOAD_URL}/KEYS | gpg --import\"" - exit 1 -fi - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file" 'https://repo.stackable.tech/repository/packages/hbase/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.asc" 'https://repo.stackable.tech/repository/packages/hbase/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.sha512" 'https://repo.stackable.tech/repository/packages/hbase/' || EXIT_STATUS=$? - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version $VERSION of HBase to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/hbase/" diff --git a/hbase/upload_new_phoenix_version.sh b/hbase/upload_new_phoenix_version.sh deleted file mode 100755 index 921af8625..000000000 --- a/hbase/upload_new_phoenix_version.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -# We prefer fast downloads... -BASE_DOWNLOAD_URL="https://dlcdn.apache.org/phoenix" -# However, if the version is not available, use the slow archive instead: -# BASE_DOWNLOAD_URL="https://archive.apache.org/dist/phoenix" - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -src_file=phoenix-$VERSION-src.tar.gz - -echo "Downloading phoenix source (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/phoenix-$VERSION/$src_file" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/phoenix-$VERSION/$src_file.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/phoenix-$VERSION/$src_file.sha512" - -# It is probably redundant to check both the checksum and the signature but it's cheap and why not -echo "Validating SHA512 Checksums" -if ! (gpg --print-md SHA512 "$src_file" | diff - "$src_file.sha512"); then - echo "ERROR: One of the SHA512 sums does not match" - exit 1 -fi - -echo "Validating signatures" -if ! (gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then - echo "ERROR: One of the signatures could not be verified" - echo "--> Make sure you have imported the KEYS file (${BASE_DOWNLOAD_URL}/KEYS) into GPG: https://www.apache.org/info/verification.html" - echo "--> e.g. \"curl ${BASE_DOWNLOAD_URL}/KEYS | gpg --import\"" - exit 1 -fi - - - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file" 'https://repo.stackable.tech/repository/packages/phoenix/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.asc" 'https://repo.stackable.tech/repository/packages/phoenix/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.sha512" 'https://repo.stackable.tech/repository/packages/phoenix/' || EXIT_STATUS=$? - - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version $VERSION of phoenix to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/phoenix/" diff --git a/hive/upload_new_hive_version.sh b/hive/upload_new_hive_version.sh deleted file mode 100755 index 2c7e51804..000000000 --- a/hive/upload_new_hive_version.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -# We prefer fast downloads... -BASE_DOWNLOAD_URL="https://dlcdn.apache.org/hive" -# However, if the version is not available, use the slow archive instead: -# BASE_DOWNLOAD_URL="https://archive.apache.org/dist/hive" - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -bin_file="apache-hive-${VERSION}-bin.tar.gz" -src_file="apache-hive-$VERSION-src.tar.gz" - -echo "Downloading Hive binary (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hive-${VERSION}/${bin_file}" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hive-${VERSION}/${bin_file}.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hive-${VERSION}/${bin_file}.sha256" - -echo "Downloading Hive source (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hive-${VERSION}/${src_file}" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hive-${VERSION}/${src_file}.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/hive-${VERSION}/${src_file}.sha256" - -# It is probably redundant to check both the checksum and the signature but it's cheap and why not -echo "Validating SHA256 Checksums" -if ! (sha256sum "${bin_file}" | diff - "${bin_file}.sha256" && sha256sum "${src_file}" | diff - "${src_file}.sha256"); then - echo "ERROR: One of the SHA256 sum does not match" - exit 1 -fi - -echo "Validating signatures" -if ! (gpg --verify "$bin_file.asc" "$bin_file" 2> /dev/null && gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then - echo "ERROR: Signature could not be verified" - echo "--> Make sure you have imported the KEYS file (${BASE_DOWNLOAD_URL}/KEYS) into GPG: https://www.apache.org/info/verification.html" - echo "--> e.g. \"curl ${BASE_DOWNLOAD_URL}/KEYS | gpg --import\"" - exit 1 -fi - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$bin_file" 'https://repo.stackable.tech/repository/packages/hive/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$bin_file.asc" 'https://repo.stackable.tech/repository/packages/hive/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$bin_file.sha256" 'https://repo.stackable.tech/repository/packages/hive/' || EXIT_STATUS=$? - -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file" 'https://repo.stackable.tech/repository/packages/hive/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.asc" 'https://repo.stackable.tech/repository/packages/hive/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.sha256" 'https://repo.stackable.tech/repository/packages/hive/' || EXIT_STATUS=$? - - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version $VERSION of Hive to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/hive/" diff --git a/kafka/upload_new_kafka_version.sh b/kafka/upload_new_kafka_version.sh deleted file mode 100755 index 8145f672e..000000000 --- a/kafka/upload_new_kafka_version.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -# We prefer fast downloads... -BASE_DOWNLOAD_URL="https://dlcdn.apache.org/kafka" -# However, if the version is not available, use the slow archive instead: -# BASE_DOWNLOAD_URL="https://archive.apache.org/dist/kafka" - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -bin_file=kafka_2.13-$VERSION.tgz -src_file=kafka-$VERSION-src.tgz - -echo "Downloading Kafka binary (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/$VERSION/$bin_file" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/$VERSION/$bin_file.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/$VERSION/$bin_file.sha512" - -echo "Downloading Kafka source (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/$VERSION/$src_file" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/$VERSION/$src_file.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/$VERSION/$src_file.sha512" - -# It is probably redundant to check both the checksum and the signature but it's cheap and why not -echo "Validating SHA512 Checksum" -if ! (gpg --print-md SHA512 "$bin_file" | diff - "$bin_file.sha512" && gpg --print-md SHA512 "$src_file" | diff - "$src_file.sha512" ); then - echo "ERROR: The SHA512 sum does not match" - exit 1 -fi - -echo "Validating signatures" -if ! (gpg --verify "$bin_file.asc" "$bin_file" 2> /dev/null && gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then - echo "ERROR: One of the signatures could not be verified" - echo "--> Make sure you have imported the KEYS file (${BASE_DOWNLOAD_URL}/KEYS) into GPG: https://www.apache.org/info/verification.html" - echo "--> e.g. \"curl ${BASE_DOWNLOAD_URL}/KEYS | gpg --import\"" - exit 1 -fi - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$bin_file" 'https://repo.stackable.tech/repository/packages/kafka/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$bin_file.asc" 'https://repo.stackable.tech/repository/packages/kafka/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$bin_file.sha512" 'https://repo.stackable.tech/repository/packages/kafka/' || EXIT_STATUS=$? - -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file" 'https://repo.stackable.tech/repository/packages/kafka/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.asc" 'https://repo.stackable.tech/repository/packages/kafka/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.sha512" 'https://repo.stackable.tech/repository/packages/kafka/' || EXIT_STATUS=$? - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version $VERSION of Kafka to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/kafka/" diff --git a/nifi/upload_new_nifi_version.sh b/nifi/upload_new_nifi_version.sh deleted file mode 100755 index a05445af4..000000000 --- a/nifi/upload_new_nifi_version.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -# We prefer fast downloads... -BASE_DOWNLOAD_URL="https://dlcdn.apache.org/nifi" -# However, if the version is not available, use the slow archive instead: -# BASE_DOWNLOAD_URL="https://archive.apache.org/dist/nifi" - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -src_file="nifi-$VERSION-source-release.zip" - -echo "Downloading NiFi source (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/$VERSION/${src_file}" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/$VERSION/${src_file}.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/$VERSION/${src_file}.sha512" - -# It is probably redundant to check both the checksum and the signature but it's cheap and why not -echo "Validating SHA512 Checksums" -# The 'echo -e "$(<"${src_file}".sha512)")' part removes possible new lines in the provided .sha512 file. -# This is due to the NiFi sha512 files sometimes ending on newline and sometimes dont. -# See https://archive.apache.org/dist/nifi/2.0.0/nifi-2.0.0-source-release.zip.sha512 vs -# https://archive.apache.org/dist/nifi/1.27.0/nifi-1.27.0-source-release.zip.sha512 -if ! (sha512sum "$src_file" | cut -d ' ' -f 1 | diff - <(echo -e "$(<"${src_file}".sha512)")); then - echo "ERROR: One of the SHA512 sums does not match" - exit 1 -fi - -echo "Validating signatures" -if ! (gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then - echo "ERROR: One of the signatures could not be verified" - echo "--> Make sure you have imported the KEYS file (${BASE_DOWNLOAD_URL}/KEYS) into GPG: https://www.apache.org/info/verification.html" - echo "--> e.g. \"curl ${BASE_DOWNLOAD_URL}/KEYS | gpg --import\"" - exit 1 -fi - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}" 'https://repo.stackable.tech/repository/packages/nifi/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}.asc" 'https://repo.stackable.tech/repository/packages/nifi/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}.sha512" 'https://repo.stackable.tech/repository/packages/nifi/' || EXIT_STATUS=$? - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version $VERSION of Nifi to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/nifi/" diff --git a/omid/upload_new_omid_version.sh b/omid/upload_new_omid_version.sh deleted file mode 100755 index d3d9ea7b5..000000000 --- a/omid/upload_new_omid_version.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bash - -set -e - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -# We prefer fast downloads... -BASE_DOWNLOAD_URL="https://dlcdn.apache.org/phoenix" -# However, if the version is not available, use the slow archive instead: -# BASE_DOWNLOAD_URL="https://archive.apache.org/dist/phoenix" - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit -src_file=phoenix-omid-$VERSION-src.tar.gz - -echo "Downloading Omid source (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/phoenix-omid-${VERSION}/${src_file}" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/phoenix-omid-$VERSION/$src_file.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/phoenix-omid-$VERSION/$src_file.sha512" - -# It is probably redundant to check both the checksum and the signature but it's cheap and why not -echo "Validating SHA512 Checksums" -if ! (gpg --print-md SHA512 "$src_file" | diff - "$src_file.sha512"); then - echo "ERROR: One of the SHA512 sums does not match" - exit 1 -fi - -echo "Validating signatures" -if ! (gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then - echo "ERROR: One of the signatures could not be verified" - echo "--> Make sure you have imported the KEYS file (${BASE_DOWNLOAD_URL}/KEYS) into GPG: https://www.apache.org/info/verification.html" - echo "--> e.g. \"curl ${BASE_DOWNLOAD_URL}/KEYS | gpg --import\"" - exit 1 -fi - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file" 'https://repo.stackable.tech/repository/packages/omid/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.asc" 'https://repo.stackable.tech/repository/packages/omid/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.sha512" 'https://repo.stackable.tech/repository/packages/omid/' || EXIT_STATUS=$? - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version $VERSION of Omid to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/omid/" diff --git a/opa/upload_new_opa_version.sh b/opa/upload_new_opa_version.sh deleted file mode 100755 index 0f2b797ef..000000000 --- a/opa/upload_new_opa_version.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -download_url="https://github.com/open-policy-agent/opa/archive/refs/tags/v${VERSION}.tar.gz" - -tar_gz_file="opa_${VERSION}.tar.gz" - -echo "Downloading OPA source from ${download_url}" -curl --fail -L -o "${tar_gz_file}" "${download_url}" - -echo "Uploading OPA source to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${tar_gz_file}" 'https://repo.stackable.tech/repository/packages/opa/' || EXIT_STATUS=$? - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version $VERSION of OPA to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/opa/" diff --git a/shared/statsd-exporter/upload_new_statsd_exporter_version.sh b/shared/statsd-exporter/upload_new_statsd_exporter_version.sh deleted file mode 100755 index 0a37fb23c..000000000 --- a/shared/statsd-exporter/upload_new_statsd_exporter_version.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -echo "Downloading STATSD EXPORTER source code" -curl --fail -LO --progress-bar "https://github.com/prometheus/statsd_exporter/archive/refs/tags/v$VERSION.tar.gz" && mv "v$VERSION.tar.gz" "statsd_exporter-$VERSION.src.tar.gz" - -echo "Uploading to Nexus" -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "statsd_exporter-$VERSION.src.tar.gz" 'https://repo.stackable.tech/repository/packages/statsd_exporter/' - -echo "Successfully uploaded new version of STATSD-EXPORTER source code ($VERSION) to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/statsd_exporter/" diff --git a/spark-k8s/upload_new_hbase-connector_version.sh b/spark-k8s/upload_new_hbase-connector_version.sh deleted file mode 100755 index 46a19af66..000000000 --- a/spark-k8s/upload_new_hbase-connector_version.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -download_url="https://github.com/apache/hbase-connectors/archive/refs/tags/rel/${VERSION}.tar.gz" - -tar_gz_file="hbase-connectors_${VERSION}.tar.gz" - -echo "Downloading hbase-connectors source from ${download_url}" -curl --fail -L -o "${tar_gz_file}" "${download_url}" - -echo "Uploading hbase-connectors source to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${tar_gz_file}" 'https://repo.stackable.tech/repository/packages/hbase-connectors/' || EXIT_STATUS=$? - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version $VERSION of hbase-connectors to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/hbase-connectors/" diff --git a/spark-k8s/upload_new_spark_version.sh b/spark-k8s/upload_new_spark_version.sh deleted file mode 100755 index 4ed6906c7..000000000 --- a/spark-k8s/upload_new_spark_version.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -# We prefer fast downloads... -BASE_DOWNLOAD_URL="https://dlcdn.apache.org/spark" -# However, if the version is not available, use the slow archive instead: -# BASE_DOWNLOAD_URL="https://archive.apache.org/dist/spark" - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -src_file="spark-${VERSION}.tgz" - -echo "Downloading Spark source (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/spark-${VERSION}/${src_file}" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/spark-${VERSION}/${src_file}.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/spark-${VERSION}/${src_file}.sha512" - -# It is probably redundant to check both the checksum and the signature but it's cheap and why not -echo "Validating SHA512 Checksum" -if ! (sha512sum "${src_file}" | diff - "${src_file}.sha512"); then - echo "ERROR: The SHA512 sum does not match" - exit 1 -fi - -echo "Validating signature" -if ! (gpg --verify "${src_file}.asc" "${src_file}" 2>/dev/null); then - echo "ERROR: The signature could not be verified" - echo "--> Make sure you have imported the KEYS file (${BASE_DOWNLOAD_URL}/KEYS) into GPG: https://www.apache.org/info/verification.html" - echo "--> e.g. \"curl ${BASE_DOWNLOAD_URL}/KEYS | gpg --import\"" - exit 1 -fi - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}" 'https://repo.stackable.tech/repository/packages/spark/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}.asc" 'https://repo.stackable.tech/repository/packages/spark/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}.sha512" 'https://repo.stackable.tech/repository/packages/spark/' || EXIT_STATUS=$? - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version ${VERSION} of Spark to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/spark/" diff --git a/trino/storage-connector/upload_new_trino_storage_connector_version.sh b/trino/storage-connector/upload_new_trino_storage_connector_version.sh deleted file mode 100755 index 737b063d5..000000000 --- a/trino/storage-connector/upload_new_trino_storage_connector_version.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -src_file=trino-storage-$VERSION-src.tar.gz - -echo "Downloading Trino Storage" -# Trino Storage provides no offficial source tarballs, download from Git -git clone https://github.com/snowlift/trino-storage "trino-storage-${VERSION}" "--branch=v${VERSION}" --depth=1 - -echo "Archiving Trino Storage" -git -C "trino-storage-${VERSION}" archive "v${VERSION}" --format=tar.gz --prefix="trino-storage-${VERSION}-src/" > "${src_file}" -sha256sum "${src_file}" | cut --delimiter=' ' --field=1 > "${src_file}.sha256" - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}" 'https://repo.stackable.tech/repository/packages/trino-storage/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}.sha256" 'https://repo.stackable.tech/repository/packages/trino-storage/' || EXIT_STATUS=$? - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version ${VERSION} of Trino Storage to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/trino-storage/" diff --git a/trino/upload_new_trino_version.sh b/trino/upload_new_trino_version.sh deleted file mode 100755 index 2dfda18ea..000000000 --- a/trino/upload_new_trino_version.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -src_file=trino-server-$VERSION-src.tar.gz - -echo "Downloading Trino" -# Trino provides no offficial source tarballs, download from Git -git clone https://github.com/trinodb/trino "trino-${VERSION}" "--branch=${VERSION}" --depth=1 - -echo "Archiving Trino" -git -C "trino-${VERSION}" archive "${VERSION}" --format=tar.gz --prefix="trino-server-${VERSION}-src/" > "${src_file}" -sha256sum "${src_file}" | cut --delimiter=' ' --field=1 > "${src_file}.sha256" - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}" 'https://repo.stackable.tech/repository/packages/trino-server/' || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}.sha256" 'https://repo.stackable.tech/repository/packages/trino-server/' || EXIT_STATUS=$? - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version ${VERSION} of Trino to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/trino-server/" diff --git a/zookeeper/upload_new_zookeeper_version.sh b/zookeeper/upload_new_zookeeper_version.sh deleted file mode 100755 index d3b74f65a..000000000 --- a/zookeeper/upload_new_zookeeper_version.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=${1:?"Missing version number argument (arg 1)"} -NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"} - -# We prefer fast downloads... -BASE_DOWNLOAD_URL="https://dlcdn.apache.org/zookeeper" -# However, if the version is not available, use the slow archive instead: -# BASE_DOWNLOAD_URL="https://archive.apache.org/dist/zookeeper" - -read -r -s -p "Nexus Password: " NEXUS_PASSWORD -echo "" - -# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory -# Find the directory name of the script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# the temp directory used, within $DIR -WORK_DIR=$(mktemp -d -p "$DIR") - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# deletes the temp directory -function cleanup { - rm -rf "$WORK_DIR" -} - -# register the cleanup function to be called on the EXIT signal -trap cleanup EXIT - -cd "$WORK_DIR" || exit - -bin_file=apache-zookeeper-$VERSION-bin.tar.gz -src_file=apache-zookeeper-$VERSION.tar.gz - -echo "Downloading ZooKeeper binary (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/zookeeper-$VERSION/$bin_file" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/zookeeper-$VERSION/$bin_file.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/zookeeper-$VERSION/$bin_file.sha512" - -echo "Downloading ZooKeeper source (if this fails, try switching the BASE_DOWNLOAD_URL to the archive)" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/zookeeper-$VERSION/$src_file" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/zookeeper-$VERSION/$src_file.asc" -curl --fail -LO --progress-bar "${BASE_DOWNLOAD_URL}/zookeeper-$VERSION/$src_file.sha512" - -# It is probably redundant to check both the checksum and the signature but it's cheap and why not -echo "Validating SHA512 Checksums for binary releases" -if ! (sha512sum "$bin_file" | diff -Z - "$bin_file.sha512"); then - echo "ERROR: One of the SHA512 sums for the binary release does not match" - exit 1 -fi -echo "Validating SHA512 Checksums for source releases" -if ! (sha512sum "$src_file" | diff -Z - "$src_file.sha512"); then - echo "ERROR: One of the SHA512 sums for the source release does not match" - exit 1 -fi - -echo "Validating signatures for binary releases" -if ! (gpg --verify "$bin_file.asc" "$bin_file" 2> /dev/null); then - echo "ERROR: One of the signatures could not be verified for a binary release" - echo "--> Make sure you have imported the KEYS file (${BASE_DOWNLOAD_URL}/KEYS) into GPG: https://www.apache.org/info/verification.html" - echo "--> e.g. \"curl ${BASE_DOWNLOAD_URL}/KEYS | gpg --import\"" - exit 1 -fi - -echo "Validating signatures for source releases" -if ! (gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then - echo "ERROR: One of the signatures could not be verified for a source release" - echo "--> Make sure you have imported the KEYS file (${BASE_DOWNLOAD_URL}/KEYS) into GPG: https://www.apache.org/info/verification.html" - echo "--> e.g. \"curl ${BASE_DOWNLOAD_URL}/KEYS | gpg --import\"" - exit 1 -fi - -echo "Uploading everything to Nexus" -EXIT_STATUS=0 -repo_url=https://repo.stackable.tech/repository/packages/zookeeper/ - -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$bin_file" "$repo_url" || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$bin_file.asc" "$repo_url" || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$bin_file.sha512" "$repo_url" || EXIT_STATUS=$? - -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file" "$repo_url" || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.asc" "$repo_url" || EXIT_STATUS=$? -curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$src_file.sha512" "$repo_url" || EXIT_STATUS=$? - -if [ $EXIT_STATUS -ne 0 ]; then - echo "ERROR: Upload failed" - exit 1 -fi - -echo "Successfully uploaded version $VERSION of ZooKeeper to Nexus" -echo "https://repo.stackable.tech/service/rest/repository/browse/packages/zookeeper/"