Skip to content

Commit

Permalink
Deploy jars to local repo for dependency check
Browse files Browse the repository at this point in the history
To fix : NVIDIA#10164

Deploy jars to local maven repo leveraging the release deploy script.

The we can check these to be released jars' dependencies in the local maven repo.

Signed-off-by: Tim Liu <[email protected]>
  • Loading branch information
NvTimLiu committed Jan 15, 2024
1 parent df144b1 commit aabb9b5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 21 additions & 1 deletion jenkins/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ ART_VER=$(mvnEval $DIST_PL project.version)
DEFAULT_CUDA_CLASSIFIER=$(mvnEval $DIST_PL cuda.version)
CUDA_CLASSIFIERS=${CUDA_CLASSIFIERS:-"$DEFAULT_CUDA_CLASSIFIER"}
CLASSIFIERS=${CLASSIFIERS:-"$CUDA_CLASSIFIERS"} # default as CUDA_CLASSIFIERS for compatibility
SERVER_ID=${SERVER_ID:-"snapshots"}
SERVER_URL=${SERVER_URL:-"file:/tmp/local-release-repo"}
ARTIFACTS_LIST=${ARTIFACTS_LIST:-"/tmp/artifacts-list"}
rm -rf $ARTIFACTS_LIST

SQL_PL=${SQL_PL:-"sql-plugin"}
POM_FILE=${POM_FILE:-"$DIST_PL/target/parallel-world/META-INF/maven/${ART_GROUP_ID}/${ART_ID}/pom.xml"}
Expand All @@ -63,7 +67,7 @@ DEPLOY_TYPES=$(echo $CLASSIFIERS | sed -e 's;[^,]*;jar;g')
DEPLOY_FILES=$(echo $CLASSIFIERS | sed -e "s;\([^,]*\);${FPATH}-\1.jar;g")

# dist does not have javadoc and sources jars, use 'sql-plugin' instead
source jenkins/version-def.sh >/dev/null 2&>1
source jenkins/version-def.sh >/dev/null 2>&1
echo $SPARK_BASE_SHIM_VERSION
SQL_ART_ID=$(mvnEval $SQL_PL project.artifactId)
SQL_ART_VER=$(mvnEval $SQL_PL project.version)
Expand Down Expand Up @@ -96,6 +100,14 @@ echo "Deploy CMD: $DEPLOY_CMD"

###### Deploy the parent pom file ######
$DEPLOY_CMD -Dfile=./pom.xml -DpomFile=./pom.xml
PARENT_ART_ID=$(mvnEval "./" project.artifactId)
echo "$ART_GROUP_ID:$PARENT_ART_ID:$ART_VER:pom" >> $ARTIFACTS_LIST

###### Deploy the jdk-profile pom file ######
JDK_PROFILES=${JDK_PROFILES:-"jdk-profiles"}
$DEPLOY_CMD -Dfile=$JDK_PROFILES/pom.xml -DpomFile=$JDK_PROFILES/pom.xml
JDK_PROFILES_ART_ID=$(mvnEval "$JDK_PROFILES" project.artifactId)
echo "$ART_GROUP_ID:$JDK_PROFILES_ART_ID:$ART_VER:pom" >> $ARTIFACTS_LIST

###### Deploy the artifact jar(s) ######
$DEPLOY_CMD -DpomFile=$POM_FILE \
Expand All @@ -105,3 +117,11 @@ $DEPLOY_CMD -DpomFile=$POM_FILE \
-Dfiles=$DEPLOY_FILES \
-Dtypes=$DEPLOY_TYPES \
-Dclassifiers=$CLASSIFIERS

echo "$ART_GROUP_ID:$ART_ID:$ART_VER:pom" >> $ARTIFACTS_LIST
echo "$ART_GROUP_ID:$ART_ID:$ART_VER:jar" >> $ARTIFACTS_LIST
CLASSLIST="$CLASSIFIERS,sources,javadoc"
CLASSLIST=(${CLASSLIST//','/' '})
for class in ${CLASSLIST[@]}; do
echo "$ART_GROUP_ID:$ART_ID:$ART_VER:jar:$class" >> $ARTIFACTS_LIST
done
2 changes: 1 addition & 1 deletion jenkins/spark-nightly-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ WORKSPACE=${WORKSPACE:-$(pwd)}
export M2DIR=${M2DIR:-"$WORKSPACE/.m2"}

## MVN_OPT : maven options environment, e.g. MVN_OPT='-Dspark-rapids-jni.version=xxx' to specify spark-rapids-jni dependency's version.
MVN="mvn -Dmaven.wagon.http.retryHandler.count=3 -DretryFailedDeploymentCount=3 ${MVN_OPT}"
MVN="mvn -Dmaven.wagon.http.retryHandler.count=3 -DretryFailedDeploymentCount=3 ${MVN_OPT} -Psource-javadoc"

DIST_PL="dist"
function mvnEval {
Expand Down

0 comments on commit aabb9b5

Please sign in to comment.