-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
54 lines (38 loc) · 3.64 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
#!groovy
def prepareEnv() {
deleteDir()
unstash 'binaries'
env.WORKSPACE = pwd()
sh "find ${env.WORKSPACE}"
sh 'mkdir -p SPECS SOURCES'
sh "cp build/distributions/*.zip SOURCES/upsilon-database-sql.zip"
}
def buildRpm(dist) {
prepareEnv()
sh 'unzip -jo SOURCES/upsilon-database-sql.zip "upsilon-database-sql-*/upsilon-database-sql.spec" "upsilon-database-sql-*/.buildid.rpmmacro" -d SPECS/'
sh "find ${env.WORKSPACE}"
sh "rpmbuild -ba SPECS/upsilon-database-sql.spec --define '_topdir ${env.WORKSPACE}' --define 'dist ${dist}'"
archiveArtifacts 'RPMS/x86_64/*.rpm'
stash includes: "RPMS/x86_64/*.rpm", name: dist
}
node {
stage "Prep"
deleteDir()
def gradle = tool 'gradle'
checkout scm
sh "make"
sh "${gradle}/bin/gradle distZip"
archiveArtifacts 'build/distributions/*.zip'
stash includes:"build/distributions/*.zip", name: "binaries"
}
stage ("Package") {
node {
buildRpm("el6")
}
node {
buildRpm("el7")
}
node {
buildRpm("fc26")
}
}