Skip to content

Commit

Permalink
Update the release script [skip ci] (#4250)
Browse files Browse the repository at this point in the history
Argument for the spark version of the final build and aggregation

Signed-off-by: Tim Liu <timl@nvidia.com>
  • Loading branch information
NvTimLiu authored Dec 2, 2021
1 parent 2766002 commit 90d846b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions jenkins/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
# SERVER_ID: The repository id for this deployment.
# SERVER_URL: The url where to deploy artifacts.
# GPG_PASSPHRASE: The passphrase used to sign files, only required when <SIGN_FILE> is true.
# FINAL_AGG_VERSION_TOBUILD: The spark version of the final build and aggregation.
###

set -ex
Expand Down Expand Up @@ -55,14 +56,14 @@ FPATH="$DIST_PL/target/$ART_ID-$ART_VER"

echo "Plan to deploy ${FPATH}.jar to $SERVER_URL (ID:$SERVER_ID)"


FINAL_AGG_VERSION_TOBUILD=${FINAL_AGG_VERSION_TOBUILD:-'301'}
###### Choose the deploy command ######

if [ "$SIGN_FILE" == true ]; then
# No javadoc and sources jar is generated for shade artifact only. Use 'sql-plugin' instead
SQL_ART_ID=`mvn help:evaluate -q -pl $SQL_PL -Dexpression=project.artifactId -DforceStdout`
SQL_ART_VER=`mvn help:evaluate -q -pl $SQL_PL -Dexpression=project.version -DforceStdout`
JS_FPATH="${SQL_PL}/target/${SQL_ART_ID}-${SQL_ART_VER}"
JS_FPATH="${SQL_PL}/target/spark${FINAL_AGG_VERSION_TOBUILD}/${SQL_ART_ID}-${SQL_ART_VER}"
SRC_DOC_JARS="-Dsources=${JS_FPATH}-sources.jar -Djavadoc=${JS_FPATH}-javadoc.jar"
DEPLOY_CMD="mvn -B gpg:sign-and-deploy-file -s jenkins/settings.xml -Dgpg.passphrase=$GPG_PASSPHRASE"
else
Expand All @@ -82,15 +83,15 @@ $DEPLOY_CMD -Durl=$SERVER_URL -DrepositoryId=$SERVER_ID \
# Distribution jar is a shaded artifact so use the reduced dependency pom.
$DEPLOY_CMD -Durl=$SERVER_URL -DrepositoryId=$SERVER_ID \
$SRC_DOC_JARS \
-Dfile=$FPATH.jar -DgroupId=com.nvidia -DartifactId=$ART_ID -Dversion=$ART_VER -DpomFile=./dist/target/dependency-reduced-pom.xml
-Dfile=$FPATH.jar -DgroupId=com.nvidia -DartifactId=$ART_ID -Dversion=$ART_VER -DpomFile=./dist/pom.xml

###### Deploy integration tests jar(s) ######
TESTS_ART_ID=`mvn help:evaluate -q -pl $TESTS_PL -Dexpression=project.artifactId -DforceStdout`
TESTS_ART_VER=`mvn help:evaluate -q -pl $TESTS_PL -Dexpression=project.version -DforceStdout`
TESTS_DOC_JARS="-Dsources=deployjars/$TESTS_ART_ID-$TESTS_ART_VER-sources.jar -Djavadoc=deployjars/$TESTS_ART_ID-$TESTS_ART_VER-javadoc.jar"
# Deploy default integration tests jar (spark301)
# Copy the final aggregation jar as the default integration-tests jar
TESTS_FPATH="deployjars/$TESTS_ART_ID-$TESTS_ART_VER"
cp $TESTS_FPATH-spark301.jar $TESTS_FPATH.jar
cp $TESTS_FPATH-spark${FINAL_AGG_VERSION_TOBUILD}.jar $TESTS_FPATH.jar
$DEPLOY_CMD -Durl=$SERVER_URL -DrepositoryId=$SERVER_ID \
$TESTS_DOC_JARS \
-Dfile=$TESTS_FPATH.jar -DpomFile=${TESTS_PL}/pom.xml
Expand Down

0 comments on commit 90d846b

Please sign in to comment.