Skip to content
Snippets Groups Projects
Commit 60f78c20 authored by Holden Karau's avatar Holden Karau
Browse files

[SPARK-22129][SPARK-22138] Release script improvements


## What changes were proposed in this pull request?

Use the GPG_KEY param, fix lsof to non-hardcoded path, remove version swap since it wasn't really needed. Use EXPORT on JAVA_HOME for downstream scripts as well.

## How was this patch tested?

Rolled 2.1.2 RC2

Author: Holden Karau <holden@us.ibm.com>

Closes #19359 from holdenk/SPARK-22129-fix-signing.

(cherry picked from commit ecbe416a)
Signed-off-by: default avatarHolden Karau <holden@us.ibm.com>
parent 361aa0ef
No related branches found
No related tags found
No related merge requests found
...@@ -74,7 +74,7 @@ GIT_REF=${GIT_REF:-master} ...@@ -74,7 +74,7 @@ GIT_REF=${GIT_REF:-master}
# Destination directory parent on remote server # Destination directory parent on remote server
REMOTE_PARENT_DIR=${REMOTE_PARENT_DIR:-/home/$ASF_USERNAME/public_html} REMOTE_PARENT_DIR=${REMOTE_PARENT_DIR:-/home/$ASF_USERNAME/public_html}
GPG="gpg --no-tty --batch" GPG="gpg -u $GPG_KEY --no-tty --batch"
NEXUS_ROOT=https://repository.apache.org/service/local/staging NEXUS_ROOT=https://repository.apache.org/service/local/staging
NEXUS_PROFILE=d63f592e7eac0 # Profile for Spark staging uploads NEXUS_PROFILE=d63f592e7eac0 # Profile for Spark staging uploads
BASE_DIR=$(pwd) BASE_DIR=$(pwd)
...@@ -116,7 +116,7 @@ else ...@@ -116,7 +116,7 @@ else
echo "Please set JAVA_HOME correctly." echo "Please set JAVA_HOME correctly."
exit 1 exit 1
else else
JAVA_HOME="$JAVA_7_HOME" export JAVA_HOME="$JAVA_7_HOME"
fi fi
fi fi
fi fi
...@@ -131,7 +131,7 @@ DEST_DIR_NAME="spark-$SPARK_PACKAGE_VERSION" ...@@ -131,7 +131,7 @@ DEST_DIR_NAME="spark-$SPARK_PACKAGE_VERSION"
function LFTP { function LFTP {
SSH="ssh -o ConnectTimeout=300 -o StrictHostKeyChecking=no -i $ASF_RSA_KEY" SSH="ssh -o ConnectTimeout=300 -o StrictHostKeyChecking=no -i $ASF_RSA_KEY"
COMMANDS=$(cat <<EOF COMMANDS=$(cat <<EOF
set net:max-retries 1 && set net:max-retries 2 &&
set sftp:connect-program $SSH && set sftp:connect-program $SSH &&
connect -u $ASF_USERNAME,p sftp://home.apache.org && connect -u $ASF_USERNAME,p sftp://home.apache.org &&
$@ $@
...@@ -341,7 +341,7 @@ if [[ "$1" == "publish-snapshot" ]]; then ...@@ -341,7 +341,7 @@ if [[ "$1" == "publish-snapshot" ]]; then
-DskipTests $PUBLISH_PROFILES clean deploy -DskipTests $PUBLISH_PROFILES clean deploy
# Clean-up Zinc nailgun process # Clean-up Zinc nailgun process
/usr/sbin/lsof -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill lsof -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill
rm $tmp_settings rm $tmp_settings
cd .. cd ..
...@@ -349,8 +349,6 @@ if [[ "$1" == "publish-snapshot" ]]; then ...@@ -349,8 +349,6 @@ if [[ "$1" == "publish-snapshot" ]]; then
fi fi
if [[ "$1" == "publish-release" ]]; then if [[ "$1" == "publish-release" ]]; then
SPARK_VERSION=$SPARK_PACKAGE_VERSION
cd spark cd spark
# Publish Spark to Maven release repo # Publish Spark to Maven release repo
echo "Publishing Spark checkout at '$GIT_REF' ($git_hash)" echo "Publishing Spark checkout at '$GIT_REF' ($git_hash)"
...@@ -381,7 +379,7 @@ if [[ "$1" == "publish-release" ]]; then ...@@ -381,7 +379,7 @@ if [[ "$1" == "publish-release" ]]; then
-DskipTests $PUBLISH_PROFILES clean install -DskipTests $PUBLISH_PROFILES clean install
# Clean-up Zinc nailgun process # Clean-up Zinc nailgun process
/usr/sbin/lsof -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill lsof -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill
./dev/change-version-to-2.10.sh ./dev/change-version-to-2.10.sh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment