forked from apache/uniffle
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathJenkinsfile
43 lines (41 loc) · 1.6 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
pipeline {
agent {
label "local"
}
environment {
VERSION = readFile "${env.WORKSPACE}/version.txt"
BUILD_BRANCH = readFile "${env.WORKSPACE}/build_branch.txt"
}
stages {
stage("checkout") {
steps {
sh """
set -ex
git fetch --all
git checkout ${BUILD_BRANCH}
git reset --hard origin/${BUILD_BRANCH}
"""
}
}
stage("build and publish") {
agent {
label "local"
}
steps {
withCredentials([usernamePassword(credentialsId: 'cred', passwordVariable: 'NEXUS_CREDS_PSW', usernameVariable: 'NEXUS_CREDS_USR')]) {
sh """
set -ex
echo "Building RSS version ${VERSION} on branch ${BUILD_BRANCH}"
docker login -u ${NEXUS_CREDS_USR} -p ${NEXUS_CREDS_PSW} docker.hops.works
./build_distribution.sh --spark3-profile spark3 --hadoop-profile hadoop3.2 --without-dashboard
cd deploy/kubernetes/docker || exit
./build.sh --hadoop-version 3.2.0.14-EE-RC0 --registry docker.hops.works --nexus-user $NEXUS_CREDS_USR --nexus-password $NEXUS_CREDS_PSW
cd ../../..
mkdir -p /opt/repository/master/rss/${VERSION}/
cp client-spark/spark3-shaded/target/rss-client-spark3-shaded-${VERSION}.jar /opt/repository/master/rss/${VERSION}/
"""
}
}
}
}
}