-
Notifications
You must be signed in to change notification settings - Fork 97
/
Jenkinsfile
152 lines (144 loc) · 4.91 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
pipeline {
agent any
stages {
stage ('Validate ARM Templates') {
options {
timeout(time: 5, unit: 'MINUTES')
}
steps {
sh 'cd opencga-app/app/cloud/azure/arm && npx --ignore-existing armval "**/azuredeploy.json"'
}
}
stage ('Test ARM Scripts') {
options {
timeout(time: 5, unit: 'MINUTES')
}
steps {
sh 'cd opencga-app/app/cloud/azure/arm/scripts && docker build .'
}
}
stage ('Build opencga-storage-hadoop-deps') {
options {
timeout(time: 30, unit: 'MINUTES')
}
steps {
sh 'mvn clean install -DskipTests -f opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps -Dcheckstyle.skip'
}
}
stage ('Build With MongoDB storage-engine') {
options {
timeout(time: 30, unit: 'MINUTES')
}
steps {
sh 'mvn clean install -DskipTests -Dopencga.war.name=opencga -Dcheckstyle.skip'
}
}
stage ('Build and publish OpenCGA Docker Images') {
options {
timeout(time: 30, unit: 'MINUTES')
}
steps {
withDockerRegistry([ credentialsId: "wasim-docker-hub", url: "" ]) {
sh "build/cloud/docker/docker-build.py --org opencb push"
}
}
}
stage ('Build With Hadoop storage-engine against hdp2.5') {
options {
timeout(time: 30, unit: 'MINUTES')
}
steps {
sh 'mvn clean install -DskipTests -P storage-hadoop -Phdp2.5 -Dcheckstyle.skip -Dopencga.war.name=opencga'
}
}
stage ('Build With Hadoop storage-engine against hdp3.1') {
options {
timeout(time: 30, unit: 'MINUTES')
}
steps {
sh 'mvn clean install -DskipTests -P storage-hadoop -Phdp3.1 -Dcheckstyle.skip -Dopencga.war.name=opencga'
}
}
stage ('Build and publish OpenCGA Docker Images hdp3.1') {
options {
timeout(time: 30, unit: 'MINUTES')
}
steps {
withDockerRegistry([ credentialsId: "wasim-docker-hub", url: "" ]) {
sh "build/cloud/docker/docker-build.py --org opencb --images base,init push"
}
}
}
stage ('Build With Hadoop storage-engine against hdp2.6') {
options {
timeout(time: 30, unit: 'MINUTES')
}
steps {
sh 'mvn clean install -DskipTests -Dstorage-mongodb -Dstorage-hadoop -Phdp2.6 -DOPENCGA.STORAGE.DEFAULT_ENGINE=hadoop -Dopencga.war.name=opencga -Dcheckstyle.skip'
}
}
stage ('Build and publish OpenCGA Docker Images hdp2.6') {
options {
timeout(time: 30, unit: 'MINUTES')
}
steps {
withDockerRegistry([ credentialsId: "wasim-docker-hub", url: "" ]) {
sh "build/cloud/docker/docker-build.py --org opencb --images base,init push"
}
}
}
stage ('Validate') {
options {
timeout(time: 5, unit: 'MINUTES')
}
steps {
sh 'mvn validate'
}
}
stage ('Clean Docker Images') {
options {
timeout(time: 10, unit: 'MINUTES')
}
steps {
sh 'docker system prune --force -a'
}
}
stage ('Quick Test') {
options {
timeout(time: 1, unit: 'HOURS')
}
when {
allOf {
changeset '**/*.java'
not {
changeset 'opencga-storage/**/*.java'
}
}
}
steps {
sh 'mvn -Dmaven.test.failure.ignore=true test -pl \'!:opencga-storage-mongodb,!:opencga-storage-hadoop,!:opencga-storage-hadoop-core\''
}
post {
success {
junit '**/target/surefire-reports/**/*.xml'
}
}
}
stage ('Complete Test') {
options {
timeout(time: 4, unit: 'HOURS')
}
when {
changeset 'opencga-storage/**/*.java'
}
steps {
sh 'mvn -Dmaven.test.failure.ignore=true test'
}
post {
success {
junit '**/target/surefire-reports/**/*.xml'
}
}
}
}
}