[CI] Deploy SNAPSHOT JARs to S3 bucket
This commit is contained in:
parent
d83db4844b
commit
40b4a45770
26
Jenkinsfile
vendored
26
Jenkinsfile
vendored
@ -95,6 +95,17 @@ pipeline {
|
|||||||
milestone ordinal: 4
|
milestone ordinal: 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Jenkins Linux: Deploy') {
|
||||||
|
agent none
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
parallel ([
|
||||||
|
'deploy-jvm-packages': { DeployJVMPackages(spark_version: '2.4.3') }
|
||||||
|
])
|
||||||
|
}
|
||||||
|
milestone ordinal: 5
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -380,3 +391,18 @@ def TestR(args) {
|
|||||||
deleteDir()
|
deleteDir()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def DeployJVMPackages(args) {
|
||||||
|
node('linux && cpu') {
|
||||||
|
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}
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
deleteDir()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -205,6 +205,29 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>release-to-s3</id>
|
||||||
|
<distributionManagement>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>maven-s3-snapshot-repo</id>
|
||||||
|
<url>s3://xgboost-maven-repo/snapshot</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
<repository>
|
||||||
|
<id>maven-s3-release-repo</id>
|
||||||
|
<url>s3://xgboost-maven-repo/release</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>maven-s3-snapshot-repo</id>
|
||||||
|
<url>https://s3.amazonaws.com/xgboost-maven-repo/snapshot</url>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>maven-s3-release-repo</id>
|
||||||
|
<url>https://s3.amazonaws.com/xgboost-maven-repo/release</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<snapshotRepository>
|
<snapshotRepository>
|
||||||
@ -324,6 +347,13 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
<extensions>
|
||||||
|
<extension>
|
||||||
|
<groupId>org.kuali.maven.wagons</groupId>
|
||||||
|
<artifactId>maven-s3-wagon</artifactId>
|
||||||
|
<version>1.2.1</version>
|
||||||
|
</extension>
|
||||||
|
</extensions>
|
||||||
</build>
|
</build>
|
||||||
<reporting>
|
<reporting>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|||||||
25
tests/ci_build/deploy_jvm_packages.sh
Executable file
25
tests/ci_build/deploy_jvm_packages.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
if [ $# -ne 1 ]; then
|
||||||
|
echo "Usage: $0 [spark version]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
spark_version=$1
|
||||||
|
|
||||||
|
# Initialize local Maven repository
|
||||||
|
./tests/ci_build/initialize_maven.sh
|
||||||
|
|
||||||
|
rm -rf build/
|
||||||
|
cd jvm-packages
|
||||||
|
# re-build package without Mock Rabit
|
||||||
|
mvn --no-transfer-progress package -Dspark.version=${spark_version} -DskipTests
|
||||||
|
|
||||||
|
# deploy to S3 bucket xgboost-maven-repo
|
||||||
|
mvn --no-transfer-progress deploy -P release-to-s3 -DskipTests
|
||||||
|
|
||||||
|
set +x
|
||||||
|
set +e
|
||||||
Loading…
x
Reference in New Issue
Block a user