Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy release candidates to local maven repo for dependency check[skip ci] #10201

Merged
merged 5 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions jenkins/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2020-2024, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -50,6 +50,12 @@ 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"}
# Save to be deployed artifact list into the file, e.g.
ARTIFACT_FILE=${ARTIFACT_FILE:-"/tmp/artifact-file"}
# Clean rtifact list file befor saving
rm -rf $ARTIFACT_FILE

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 +69,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 +102,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" >> $ARTIFACT_FILE
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

save artifact like com.nvidia:rapids-4-spark-parent_2.12:24.02.0-SNAPSHOT:pom into $ARTIFACT_FILE

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To elaborate on the previous comment, we don't have to register intermediate pom for an explicit check via an $ARTIFACT_FILE line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated


###### Deploy the jdk-profile pom file ######
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy pom.xml file of the module jdk-profiles here, to PASS the release artifact's dependency check

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" >> $ARTIFACT_FILE

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

echo "$ART_GROUP_ID:$ART_ID:$ART_VER:pom" >> $ARTIFACT_FILE
echo "$ART_GROUP_ID:$ART_ID:$ART_VER:jar" >> $ARTIFACT_FILE
CLASSLIST="$CLASSIFIERS,sources,javadoc"
CLASSLIST=(${CLASSLIST//','/' '})
for class in ${CLASSLIST[@]}; do
echo "$ART_GROUP_ID:$ART_ID:$ART_VER:jar:$class" >> $ARTIFACT_FILE
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The artifact file is like below, and our plugin nightly build CI will check all these artifacts dependencies.

com.nvidia:rapids-4-spark-parent_2.12:24.02.0-SNAPSHOT:pom
com.nvidia:rapids-4-spark-jdk-profiles_2.12:24.02.0-SNAPSHOT:pom
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:pom
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:cuda11
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:sources
com.nvidia:rapids-4-spark_2.12:24.02.0-SNAPSHOT:jar:javadoc

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"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sources.jar and javadoc.jar files are required by OSS release

Generate these 2 files to mimic OSS release in our nightly build CI


DIST_PL="dist"
function mvnEval {
Expand Down