[CI] Build GPU-enabled JAR artifact and deploy to xgboost-maven-repo
This commit is contained in:
parent
936a854baa
commit
eee4eff49b
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
@ -472,10 +472,11 @@ def DeployJVMPackages(args) {
|
||||
unstash name: 'srcs'
|
||||
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('release')) {
|
||||
echo 'Deploying to xgboost-maven-repo S3 repo...'
|
||||
def container_type = "jvm"
|
||||
def docker_binary = "docker"
|
||||
sh """
|
||||
${dockerRun} ${container_type} ${docker_binary} tests/ci_build/deploy_jvm_packages.sh ${args.spark_version}
|
||||
${dockerRun} jvm docker tests/ci_build/deploy_jvm_packages.sh ${args.spark_version} 0
|
||||
"""
|
||||
sh """
|
||||
${dockerRun} jvm_gpu_build docker tests/ci_build/deploy_jvm_packages.sh ${args.spark_version} 1
|
||||
"""
|
||||
}
|
||||
deleteDir()
|
||||
|
||||
@ -3,22 +3,32 @@
|
||||
set -e
|
||||
set -x
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 [spark version]"
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "Usage: $0 [spark version] [build_gpu? 0 or 1]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
spark_version=$1
|
||||
build_gpu=$2
|
||||
|
||||
# Initialize local Maven repository
|
||||
./tests/ci_build/initialize_maven.sh
|
||||
|
||||
rm -rf build/
|
||||
cd jvm-packages
|
||||
rm -rf $(find . -name target)
|
||||
rm -rf ../build/
|
||||
|
||||
# Re-build package without Mock Rabit
|
||||
# Deploy to S3 bucket xgboost-maven-repo
|
||||
mvn --no-transfer-progress package deploy -P release-to-s3 -Dspark.version=${spark_version} -DskipTests
|
||||
if [[ "$build_gpu" == "1" ]]
|
||||
then
|
||||
# Build CPU artifact
|
||||
mvn --no-transfer-progress package deploy -P release-to-s3 -Dspark.version=${spark_version} -DskipTests
|
||||
else
|
||||
# Build GPU artifact
|
||||
sed -i -e 's/<artifactId>xgboost\(.*\)_\(.*\)<\/artifactId>/<artifactId>xgboost\1-gpu_\2<\/artifactId>/' $(find . -name pom.xml)
|
||||
mvn --no-transfer-progress package deploy -Duse.cuda=ON -P release-to-s3 -Dspark.version=${spark_version} -DskipTests
|
||||
fi
|
||||
|
||||
set +x
|
||||
set +e
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user