blob: 13c3b2f624880b3ed211b9d11a43b89765c8a1ed [file] [log] [blame]
Suchitra Vemuriddb27792018-08-23 15:29:42 -07001// Copyright 2017-present Open Networking Foundation
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Zack Williams5ce76d42020-02-28 15:45:56 -070015node ("${buildNode}") {
Luca Preteb3029bd2018-08-28 16:31:39 -070016 timeout (100) {
17 try {
18 stage ("Parse deployment configuration file") {
Luca Prete48634052018-12-21 15:31:51 -080019 sh returnStdout: true, script: "rm -rf helm-repo-tools ${configBaseDir}"
20 sh returnStdout: true, script: "git clone -b ${branch} ${cordRepoUrl}/helm-repo-tools"
You Wangd6c5e8c2018-08-29 12:49:51 -070021 sh returnStdout: true, script: "git clone -b ${branch} ${cordRepoUrl}/${configBaseDir}"
You Wang59ded6c2018-10-05 17:43:44 -070022 deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
Suchitra Vemuriddb27792018-08-23 15:29:42 -070023 }
Luca Preteb3029bd2018-08-28 16:31:39 -070024 stage('Clean up') {
25 timeout(10) {
26 sh returnStdout: true, script: """
Luca Preteb3029bd2018-08-28 16:31:39 -070027 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
Luca Prete5a970152018-08-29 15:20:47 -070028 for hchart in \$(helm list -q | grep -E -v 'docker-registry|mavenrepo|ponnet');
Luca Preteb3029bd2018-08-28 16:31:39 -070029 do
30 echo "Purging chart: \${hchart}"
31 helm delete --purge "\${hchart}"
32 done
Suchitra Vemuriddb27792018-08-23 15:29:42 -070033 """
Luca Preteb3029bd2018-08-28 16:31:39 -070034 timeout(5) {
35 waitUntil {
36 helm_deleted = sh returnStdout: true, script: """
37 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
Luca Preteb4966672018-08-29 16:49:48 -070038 helm ls -q | grep -E -v 'docker-registry|mavenrepo|ponnet' | wc -l
Suchitra Vemuriddb27792018-08-23 15:29:42 -070039 """
Luca Preteb3029bd2018-08-28 16:31:39 -070040 return helm_deleted.toInteger() == 0
41 }
42 }
43 timeout(5) {
44 waitUntil {
45 kubectl_deleted = sh returnStdout: true, script: """
46 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
Luca Preteb4966672018-08-29 16:49:48 -070047 kubectl get pods --all-namespaces --no-headers | grep -E -v 'kube-system|docker-registry|mavenrepo|ponnet' | wc -l
Luca Preteb3029bd2018-08-28 16:31:39 -070048 """
49 return kubectl_deleted.toInteger() == 0
Suchitra Vemuriddb27792018-08-23 15:29:42 -070050 }
51 }
52 }
53 }
Luca Prete62a48c82019-01-16 10:40:01 -080054 stage('Add Helm repositories') {
Kailash4321b4d2018-12-18 13:11:08 -080055 sh returnStdout: true, script: """
56 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
Kailashe841eca2019-03-13 13:18:14 -070057 helm repo add cord ${helmRepoUrl}
Luca Prete62a48c82019-01-16 10:40:01 -080058 helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
Kailash4321b4d2018-12-18 13:11:08 -080059 helm repo update
60 """
61 timeout(1) {
62 waitUntil {
63 cord_repo_present = sh returnStdout: true, script: """
64 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
65 helm repo list | grep cord | wc -l
Kailash Khalasi100cf462018-09-20 10:24:57 -070066 """
Kailash4321b4d2018-12-18 13:11:08 -080067 return cord_repo_present.toInteger() == 1
Matteo Scandolo2f8271f2018-12-12 15:54:54 -080068 }
69 }
Suchitra Vemuriddb27792018-08-23 15:29:42 -070070 }
Luca Prete31eda022018-12-21 13:49:44 -080071 stage('Install CORD Kafka') {
72 timeout(10) {
73 sh returnStdout: true, script: """
74 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
Zack Williams2a458342019-01-14 14:53:24 -070075 helm install --version 0.13.3 --set configurationOverrides."offsets\\.topic\\.replication\\.factor"=1 --set configurationOverrides."log\\.retention\\.hours"=4 --set configurationOverrides."log\\.message\\.timestamp\\.type"="LogAppendTime" --set replicas=1 --set persistence.enabled=false --set zookeeper.replicaCount=1 --set zookeeper.persistence.enabled=false -n cord-kafka incubator/kafka
Luca Prete31eda022018-12-21 13:49:44 -080076 """
77 }
78 timeout(10) {
79 waitUntil {
80 kafka_instances_running = sh returnStdout: true, script: """
81 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
82 kubectl get pods | grep cord-kafka | grep -i running | grep 1/1 | wc -l
Kailash4321b4d2018-12-18 13:11:08 -080083 """
Luca Prete31eda022018-12-21 13:49:44 -080084 return kafka_instances_running.toInteger() == 2
Kailash4321b4d2018-12-18 13:11:08 -080085 }
86 }
Luca Prete31eda022018-12-21 13:49:44 -080087 }
Matteo Scandolo863e3b12019-04-16 14:55:10 -070088 if ( params.installMonitoringAndLogging ) {
89 stage('Install Logging Infrastructure') {
90 timeout(10) {
91 sh returnStdout: true, script: """
92 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
93 helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml --set elasticsearch.cluster.env.MINIMUM_MASTER_NODES="1" --set elasticsearch.client.replicas=1 --set elasticsearch.master.replicas=2 --set elasticsearch.master.persistence.enabled=false --set elasticsearch.data.replicas=1 --set elasticsearch.data.persistence.enabled=false -n logging cord/logging
94 helm-repo-tools/wait_for_pods.sh
95 """
96 }
97 }
98 stage('Install Monitoring Infrastructure') {
99 timeout(10) {
100 sh returnStdout: true, script: """
101 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
102 helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n nem-monitoring cord/nem-monitoring
103 helm-repo-tools/wait_for_pods.sh
104 """
105 }
106 }
Luca Prete31eda022018-12-21 13:49:44 -0800107 }
108 stage('Install etcd-cluster') {
109 timeout(10) {
110 sh returnStdout: true, script: """
111 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
Zack Williams2a458342019-01-14 14:53:24 -0700112 helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml --version 0.8.3 -n etcd-operator stable/etcd-operator
Luca Prete31eda022018-12-21 13:49:44 -0800113 """
114 }
115 timeout(10) {
116 waitUntil {
117 etcd_running = sh returnStdout: true, script: """
118 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
119 kubectl get pods | grep etcd | grep -i running | grep 1/1 | wc -l
Kailash4321b4d2018-12-18 13:11:08 -0800120 """
Luca Prete31eda022018-12-21 13:49:44 -0800121 return etcd_running.toInteger() == 3
Kailash4321b4d2018-12-18 13:11:08 -0800122 }
123 }
Luca Prete31eda022018-12-21 13:49:44 -0800124 }
125 stage('Install voltha') {
126 timeout(10) {
127 sh returnStdout: true, script: """
128 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
Kailash33499342019-07-01 21:39:01 -0700129 helm install -n voltha -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml cord/voltha --version 1.0.6
Luca Prete31eda022018-12-21 13:49:44 -0800130 """
131 }
132 timeout(10) {
133 waitUntil {
134 voltha_completed = sh returnStdout: true, script: """
135 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
136 kubectl get pods -n voltha | grep -i running | grep 1/1 | wc -l
Kailash4321b4d2018-12-18 13:11:08 -0800137 """
Luca Prete31eda022018-12-21 13:49:44 -0800138 return voltha_completed.toInteger() == 8
Kailash4321b4d2018-12-18 13:11:08 -0800139 }
140 }
Luca Prete31eda022018-12-21 13:49:44 -0800141 }
142 stage('Install ONOS') {
143 timeout(10) {
144 sh returnStdout: true, script: """
145 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
Kailash33499342019-07-01 21:39:01 -0700146 helm install -n onos -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml cord/onos
Luca Prete31eda022018-12-21 13:49:44 -0800147 """
148 }
149 timeout(10) {
150 waitUntil {
151 onos_completed = sh returnStdout: true, script: """
152 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
153 kubectl get pods | grep -i onos | grep -i running | grep 2/2 | wc -l
Kailash4321b4d2018-12-18 13:11:08 -0800154 """
Luca Prete31eda022018-12-21 13:49:44 -0800155 return onos_completed.toInteger() == 1
Kailash4321b4d2018-12-18 13:11:08 -0800156 }
157 }
Luca Prete31eda022018-12-21 13:49:44 -0800158 }
159 stage('Install xos-core') {
160 timeout(10) {
161 sh returnStdout: true, script: """
162 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
Kailash33499342019-07-01 21:39:01 -0700163 helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n xos-core cord/xos-core
164
Luca Prete31eda022018-12-21 13:49:44 -0800165 """
166 }
167 timeout(10) {
168 waitUntil {
169 xos_core_completed = sh returnStdout: true, script: """
170 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
171 kubectl get pods | grep -i xos | grep -i running | grep 1/1 | wc -l
Kailash4321b4d2018-12-18 13:11:08 -0800172 """
Luca Prete31eda022018-12-21 13:49:44 -0800173 return xos_core_completed.toInteger() == 6
Kailash4321b4d2018-12-18 13:11:08 -0800174 }
175 }
Luca Prete31eda022018-12-21 13:49:44 -0800176 }
177 stage('Install seba-services') {
178 timeout(10) {
179 sh returnStdout: true, script: """
180 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
Kailash33499342019-07-01 21:39:01 -0700181 helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n seba-services cord/seba-services
Luca Prete31eda022018-12-21 13:49:44 -0800182 """
183 }
184 timeout(10) {
185 waitUntil {
186 att_workflow_tosca_completed = sh returnStdout: true, script: """
187 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
188 kubectl get pods | grep -i seba-services-tosca-loader | grep -i completed | wc -l
Kailash4321b4d2018-12-18 13:11:08 -0800189 """
Luca Prete31eda022018-12-21 13:49:44 -0800190 return att_workflow_tosca_completed.toInteger() == 1
Kailash4321b4d2018-12-18 13:11:08 -0800191 }
192 }
Luca Prete31eda022018-12-21 13:49:44 -0800193 }
194 stage('Install base-kubernetes') {
195 timeout(10) {
196 sh returnStdout: true, script: """
197 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
Kailash33499342019-07-01 21:39:01 -0700198 helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n base-kubernetes cord/base-kubernetes
Luca Prete31eda022018-12-21 13:49:44 -0800199 """
200 }
201 timeout(10) {
202 waitUntil {
203 base_kubernetes_tosca_running = sh returnStdout: true, script: """
204 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
205 kubectl get pods | grep -i base-kubernetes-tosca-loader | grep -i completed | wc -l
Kailash4321b4d2018-12-18 13:11:08 -0800206 """
Luca Prete31eda022018-12-21 13:49:44 -0800207 return base_kubernetes_tosca_running.toInteger() == 1
Kailash4321b4d2018-12-18 13:11:08 -0800208 }
209 }
Luca Prete31eda022018-12-21 13:49:44 -0800210 }
211 stage('Install att workflow') {
212 timeout(10) {
213 sh returnStdout: true, script: """
214 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
Kailash33499342019-07-01 21:39:01 -0700215 helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml --set att-workflow-driver.kafkaService=cord-kafka -n att-workflow cord/att-workflow
Luca Prete31eda022018-12-21 13:49:44 -0800216 """
Kailash58255ca2018-12-19 09:48:46 -0800217 }
Luca Prete31eda022018-12-21 13:49:44 -0800218 timeout(10) {
219 waitUntil {
220 att_workflow_tosca_completed = sh returnStdout: true, script: """
221 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
222 kubectl get pods | grep -i att-workflow-tosca-loader | grep -i completed | wc -l
Kailash58255ca2018-12-19 09:48:46 -0800223 """
Luca Prete31eda022018-12-21 13:49:44 -0800224 return att_workflow_tosca_completed.toInteger() == 1
Kailash4321b4d2018-12-18 13:11:08 -0800225 }
226 }
227 }
228
Kailash9b56c862018-11-29 08:45:25 -0800229 if ( params.reinstallOlt ) {
230 stage('Reinstall OLT software') {
231 for(int i=0; i < deployment_config.olts.size(); i++) {
Luca Preteb3029bd2018-08-28 16:31:39 -0700232 sh returnStdout: true, script: """
Kailash9b56c862018-11-29 08:45:25 -0800233 sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'dpkg --remove asfvolt16 && dpkg --purge asfvolt16'
Luca Preteb3029bd2018-08-28 16:31:39 -0700234 """
Kailash9b56c862018-11-29 08:45:25 -0800235 timeout(5) {
236 waitUntil {
237 olt_sw_present = sh returnStdout: true, script: """
238 sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'dpkg --list | grep asfvolt16 | wc -l'
239 """
240 return olt_sw_present.toInteger() == 0
241 }
242 }
243 sh returnStdout: true, script: """
244 sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} "dpkg --install ${oltDebVersion}"
245 """
246 timeout(5) {
247 waitUntil {
248 olt_sw_present = sh returnStdout: true, script: """
249 sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'dpkg --list | grep asfvolt16 | wc -l'
250 """
251 return olt_sw_present.toInteger() == 1
252 }
253 }
254 // If the OLT is connected to a 40G switch interface, set the NNI port to be downgraded
255 if ("${deployment_config.olts[i].fortygig}" != null && "${deployment_config.olts[i].fortygig}" == 'true') {
256 sh returnStdout: true, script: """
257 sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'echo "port ce128 sp=40000" >> /broadcom/qax.soc'
258 sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} '/opt/bcm68620/svk_init.sh'
259 """
260 }
Luca Preteb3029bd2018-08-28 16:31:39 -0700261 }
262 }
Kailash9b56c862018-11-29 08:45:25 -0800263 stage('Restart OLT processes') {
264 for(int i=0; i < deployment_config.olts.size(); i++) {
265 timeout(5) {
266 sh returnStdout: true, script: """
267 ssh-keyscan -H ${deployment_config.olts[i].ip} >> ~/.ssh/known_hosts
268 sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'service bal_core_dist stop' || true
269 sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'service openolt stop' || true
270 sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} '> /var/log/bal_core_dist.log'
271 sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} '> /var/log/openolt.log'
272 sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'service bal_core_dist start &'
273 sleep 5
274 sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'service openolt start &'
275 """
276 }
277 timeout(15) {
278 waitUntil {
279 onu_discovered = sh returnStdout: true, script: "sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'cat /var/log/openolt.log | grep \"oper_state: up\" | wc -l'"
280 return onu_discovered.toInteger() > 0
281 }
Luca Preteb3029bd2018-08-28 16:31:39 -0700282 }
283 }
284 }
285 }
Kailash Khalasi4d18e202018-09-14 13:32:16 -0700286 if ( params.configurePod ) {
Kailash Khalasidef2f4e2018-09-17 10:39:14 -0700287 dir ("${configBaseDir}/${configToscaDir}/att-workflow") {
Kailash Khalasi4d18e202018-09-14 13:32:16 -0700288 stage('Configure R-CORD - Fabric and whitelist') {
289 timeout(1) {
290 waitUntil {
291 out_fabric = sh returnStdout: true, script: """
292 curl -s -H "xos-username:admin@opencord.org" -H "xos-password:letmein" -X POST --data-binary @${configFileName}-fabric.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
293 """
294 return out_fabric.toInteger() == 1
295 }
Kailash Khalasic1a90f12018-09-13 13:13:22 -0700296 }
297 }
Kailash Khalasi4d18e202018-09-14 13:32:16 -0700298 stage('Configure R-CORD - Subscriber') {
299 timeout(1) {
300 waitUntil {
301 out_subscriber = sh returnStdout: true, script: """
302 curl -s -H 'xos-username:admin@opencord.org' -H 'xos-password:letmein' -X POST --data-binary @${configFileName}-subscriber.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
303 """
304 return out_subscriber.toInteger() == 1
305 }
Kailash Khalasic1a90f12018-09-13 13:13:22 -0700306 }
307 }
Kailash Khalasi4d18e202018-09-14 13:32:16 -0700308 stage('Configure R-CORD - OLT') {
309 timeout(1) {
310 waitUntil {
311 out_olt = sh returnStdout: true, script: """
312 curl -H 'xos-username:admin@opencord.org' -H 'xos-password:letmein' -X POST --data-binary @${configFileName}-olt.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
313 """
314 return out_olt.toInteger() == 1
315 }
Kailash Khalasic1a90f12018-09-13 13:13:22 -0700316 }
317 }
Luca Preteb3029bd2018-08-28 16:31:39 -0700318 }
Suchitra Vemuriddb27792018-08-23 15:29:42 -0700319 }
Matteo Scandolo8819edd2018-11-27 13:18:08 -0800320 if ( params.installBBSim ) {
Luca Prete31eda022018-12-21 13:49:44 -0800321 stage('Install BBSim') {
322 timeout(10) {
323 sh returnStdout: true, script: """
324 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
Suchitra Vemuri82fd4ff2019-03-05 20:41:15 -0800325 helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n bbsim cord/bbsim --set onus_per_pon_port=${onuNumber}
Luca Prete31eda022018-12-21 13:49:44 -0800326 """
327 }
328 timeout(10) {
329 waitUntil {
330 bbsim_running = sh returnStdout: true, script: """
331 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
332 kubectl get pods -n voltha | grep -i bbsim | wc -l
Matteo Scandolo8819edd2018-11-27 13:18:08 -0800333 """
Luca Prete31eda022018-12-21 13:49:44 -0800334 return bbsim_running.toInteger() == 1
Matteo Scandolo8819edd2018-11-27 13:18:08 -0800335 }
336 }
337 }
338 dir ("${configBaseDir}/${configToscaDir}/bbsim") {
339 stage('Configure BBSim - OLT') {
340 timeout(1) {
341 waitUntil {
342 out_olt = sh returnStdout: true, script: """
343 curl -H 'xos-username:admin@opencord.org' -H 'xos-password:letmein' -X POST --data-binary @bbsim-16.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
344 """
345 return out_olt.toInteger() == 1
346 }
347 }
348 }
349 }
350 }
Luca Preteb3029bd2018-08-28 16:31:39 -0700351 currentBuild.result = 'SUCCESS'
352 } catch (err) {
353 currentBuild.result = 'FAILURE'
354 step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false])
Matteo Scandolob0607672019-04-16 15:33:37 -0700355 throw err
Luca Preteb3029bd2018-08-28 16:31:39 -0700356 }
357 echo "RESULT: ${currentBuild.result}"
Suchitra Vemuriddb27792018-08-23 15:29:42 -0700358 }
359}