forked from NVIDIA/spark-rapids
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pre-merge-ci' into 'master'
Add pre-merge CI for rapids-plugin See merge request nvspark/rapids-plugin-4-spark!38
- Loading branch information
Showing
4 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
### | ||
# | ||
# Build the image for rapids-plugin development environment | ||
# | ||
# Arguments: CUDA_VER=9.2 or 10.0 | ||
# | ||
### | ||
|
||
ARG CUDA_VER=10.0 | ||
|
||
FROM nvidia/cuda:${CUDA_VER}-runtime-ubuntu16.04 | ||
|
||
#Install maven for rapids-4-spark-plugin build | ||
#install java 8, maven, on ubuntu16.04_cuda x.x docker image | ||
RUN apt update -y && \ | ||
apt install -y maven \ | ||
openjdk-8-jdk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/** | ||
* | ||
* Jenkinsfile for rapids-plugin building ubuntu/centos, cuda9.2/cuda10 versions | ||
* | ||
*/ | ||
|
||
pipeline { | ||
agent { label 'vanilla' } | ||
|
||
options { | ||
ansiColor('xterm') | ||
timeout(time: 120, unit: 'MINUTES') | ||
buildDiscarder(logRotator(numToKeepStr: '10')) | ||
} | ||
|
||
parameters { | ||
string(name: 'REF', defaultValue: 'support-gpu', description: 'Commit to build') | ||
} | ||
|
||
environment { | ||
JENKINS_ROOT = 'jenkins' | ||
BUILD_SCRIPT = '$JENKINS_ROOT/build-plugin.sh' | ||
} | ||
|
||
stages { | ||
stage('Build and Test') { | ||
parallel { | ||
stage('Ubuntu16 CUDA9.2') { | ||
agent { | ||
dockerfile { | ||
label 'docker-gpu' | ||
filename 'Dockerfile.ubuntu16' | ||
dir "$JENKINS_ROOT" | ||
args '--runtime=nvidia -v ${HOME}/.m2:${HOME}/.m2:rw \ | ||
-v ${HOME}/.zinc:${HOME}/.zinc:rw \ | ||
-v /etc/passwd:/etc/passwd -v /etc/group:/etc/group' | ||
additionalBuildArgs '--build-arg CUDA_VER=9.2' | ||
} | ||
} | ||
steps { | ||
sh "bash $BUILD_SCRIPT 9.2" | ||
} | ||
} | ||
stage('Ubuntu16 CUDA10.0') { | ||
agent { | ||
dockerfile { | ||
label 'docker-gpu' | ||
filename 'Dockerfile.ubuntu16' | ||
dir "$JENKINS_ROOT" | ||
args '--runtime=nvidia -v ${HOME}/.m2:${HOME}/.m2:rw \ | ||
-v ${HOME}/.zinc:${HOME}/.zinc:rw \ | ||
-v /etc/passwd:/etc/passwd -v /etc/group:/etc/group' | ||
additionalBuildArgs '--build-arg CUDA_VER=10.0' | ||
} | ||
} | ||
steps { | ||
script { | ||
echo 'buiding ubuntu16 cuda10.0 ...' | ||
sh "bash $BUILD_SCRIPT 10.0" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} // end of stages | ||
|
||
post { | ||
always { | ||
script { | ||
if (currentBuild.currentResult == "SUCCESS") { | ||
updateGitlabCommitStatus(name: 'Jenkins CI', state: "success") | ||
slack("#rapidsai-spark-cicd", "Success", color: "#33CC33") | ||
} else { | ||
updateGitlabCommitStatus(name: 'Jenkins CI', state: "failed") | ||
slack("#rapidsai-spark-cicd", "Failed", color: "#FF0000") | ||
} | ||
} | ||
} | ||
} | ||
} // end of pipeline | ||
|
||
void slack(Map params = [:], String channel, String message) { | ||
Map defaultParams = [ | ||
color: "#000000", | ||
baseUrl: "https://nvidia.slack.com/services/hooks/jenkins-ci/", | ||
tokenCredentialId: "slack_token" | ||
] | ||
|
||
params["channel"] = channel | ||
params["message"] = "${BUILD_URL}\n" + message | ||
|
||
slackSend(defaultParams << params) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
## | ||
# | ||
# Script to build rapids-plugin jar files. | ||
# Source tree is supposed to be ready by Jenkins before starting this script. | ||
# | ||
### | ||
set -e | ||
|
||
CLASSIFIERS="" | ||
CUDA_VER=$1 | ||
#set cuda9 as default | ||
if [ "$CUDA_VER" == "10.0" ]; then | ||
CUDA_VER="cuda10" | ||
else | ||
CUDA_VER="" | ||
fi | ||
|
||
#pull cuda9 version of cudf from maven when the classifier is "" | ||
BUILD_ARG="-Dcuda.version=$CUDA_VER" | ||
|
||
echo "mvn -X clean package $BUILD_ARG" | ||
|
||
mvn $BUILD_ARG -X clean package -DskipTests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters