forked from SQream/sqream-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
57 lines (55 loc) · 1.77 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
if (params.version_num == "") {
error("Please provide the version_num parameter!")
}
pipeline {
agent {
label "x86_64_compilation"
}
stages {
stage("Set build number and build user"){
steps {
wrap([$class: 'BuildUser']){
script {
currentBuild.displayName = "#${BUILD_ID}.${BUILD_USER}"
}
}
}
}
stage('git clone jdbc') {
steps {
sh '''
rm -rf jdbc-driver
git clone -b $branch http://gitlab.sq.l/connectors/jdbc-driver.git --recursive
'''
}
}
stage('Build'){
steps {
sh """
chmod u+x jenkins_build.sh
./jenkins_build.sh
"""
}
}
//stage('Unit Testing'){
// steps {
// sh 'cd jdbc-driver; mvn -Dtest=JDBCTest surefire:test'
// }
//}
stage('upload to artifactory'){
steps {
sh '''
rm jdbc-driver/target/sqream-jdbc-$version_num.jar
rm jdbc-driver/target/original-sqream-jdbc-$version_num.jar
mv jdbc-driver/target/sqream-jdbc-$version_num-jar-with-dependencies.jar jdbc-driver/target/sqream-jdbc-$version_num.jar
file_to_upload=sqream-jdbc-$version_num.jar
echo $file_to_upload
cd jdbc-driver/target/
curl -u ${ARTIFACT_USER}:${ARTIFACT_PASSWORD} -T $file_to_upload $ARTIFACTORY_URL/connectors/jdbc/$env/
cd ../..
rm -rf jdbc-driver/
'''
}
}
}
}