blob: 7513557bc709ea559e4da7c97a8e8c8f8654be37 [file] [log] [blame]
TorstenThieme326e7972021-01-19 14:27:59 +00001// 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
15// voltha-2.x e2e tests
16// uses kind-voltha to deploy voltha-2.X
17// uses bbsim to simulate OLT/ONUs
18
19pipeline {
20
21 /* no label, executor is determined by JJB */
22 agent {
23 label "${params.buildNode}"
24 }
25 options {
TorstenThieme685b89b2021-01-28 12:59:23 +000026 timeout(time: 130, unit: 'MINUTES')
TorstenThieme326e7972021-01-19 14:27:59 +000027 }
28 environment {
29 KUBECONFIG="$HOME/.kube/kind-config-voltha-minimal"
30 VOLTCONFIG="$HOME/.volt/config-minimal"
31 PATH="$PATH:$WORKSPACE/kind-voltha/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
32 NAME="minimal"
33 FANCY=0
34 WITH_SIM_ADAPTERS="no"
35 WITH_RADIUS="yes"
36 WITH_BBSIM="yes"
37 DEPLOY_K8S="yes"
38 VOLTHA_LOG_LEVEL="DEBUG"
39 CONFIG_SADIS="external"
40 BBSIM_CFG="configs/bbsim-sadis-att.yaml"
41 ROBOT_MISC_ARGS="-e PowerSwitch ${params.extraRobotArgs}"
42 KARAF_HOME="${params.karafHome}"
43 DIAGS_PROFILE="VOLTHA_PROFILE"
44 NUM_OF_BBSIM="${olts}"
45 }
46 stages {
47 stage('Clone kind-voltha') {
48 steps {
49 checkout([
50 $class: 'GitSCM',
51 userRemoteConfigs: [[
52 url: "https://gerrit.opencord.org/kind-voltha",
53 // refspec: "${kindVolthaChange}"
54 ]],
55 branches: [[ name: "master", ]],
56 extensions: [
57 [$class: 'WipeWorkspace'],
58 [$class: 'RelativeTargetDirectory', relativeTargetDir: "kind-voltha"],
59 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
60 ],
61 ])
62 }
63 }
64 stage('Cleanup') {
65 steps {
66 sh """
Andrea Campanella57735a82021-05-18 13:22:49 +020067 if [ "${branch}" != "master" ]; then
68 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
69 source "$WORKSPACE/kind-voltha/releases/${branch}"
70 else
71 echo "on master, using default settings for kind-voltha"
72 fi
TorstenThieme326e7972021-01-19 14:27:59 +000073 cd $WORKSPACE/kind-voltha/
74 WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down || ./voltha down
75 """
76 }
77 }
78 stage('Clone voltha-system-tests') {
79 steps {
80 checkout([
81 $class: 'GitSCM',
82 userRemoteConfigs: [[
83 url: "https://gerrit.opencord.org/voltha-system-tests",
84 // refspec: "${volthaSystemTestsChange}"
85 ]],
86 branches: [[ name: "${branch}", ]],
87 extensions: [
88 [$class: 'WipeWorkspace'],
89 [$class: 'RelativeTargetDirectory', relativeTargetDir: "voltha-system-tests"],
90 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
91 ],
92 ])
93 }
94 }
95
96 stage('Deploy Voltha') {
97 steps {
98 sh """
99 export EXTRA_HELM_FLAGS=""
100 if [ "${branch}" != "master" ]; then
101 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
102 source "$WORKSPACE/kind-voltha/releases/${branch}"
103 else
104 echo "on master, using default settings for kind-voltha"
105 fi
106
107 EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${params.extraHelmFlags} --set defaults.image_registry=mirror.registry.opennetworking.org/ "
108
109 cd $WORKSPACE/kind-voltha/
110 ./voltha up
TorstenThieme669258d2021-01-29 09:03:10 +0000111 bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/kind-voltha/bin"
TorstenThieme326e7972021-01-19 14:27:59 +0000112 """
113 }
114 }
115
116 stage('Run E2E Tests 1t1gem') {
117 environment {
118 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/1t1gem"
119 }
120 steps {
121 sh '''
122 # start logging
123 mkdir -p $WORKSPACE/1t1gem
124 _TAG=kail-1t1gem kail -n voltha -n default > $WORKSPACE/1t1gem/onos-voltha-combined.log &
125
126 mkdir -p $ROBOT_LOGS_DIR/1t1gem
127 export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR"
TorstenThieme41c08632021-02-11 11:08:18 +0000128 export KVSTOREPREFIX=voltha_voltha
TorstenThieme326e7972021-01-19 14:27:59 +0000129
TorstenThieme669258d2021-01-29 09:03:10 +0000130 make -C $WORKSPACE/voltha-system-tests ${makeTarget} || true
TorstenThieme326e7972021-01-19 14:27:59 +0000131
132 # stop logging
133 P_IDS="$(ps e -ww -A | grep "_TAG=kail-1t1gem" | grep -v grep | awk '{print $1}')"
134 if [ -n "$P_IDS" ]; then
135 echo $P_IDS
136 for P_ID in $P_IDS; do
137 kill -9 $P_ID
138 done
139 fi
140
141 # get pods information
142 kubectl get pods -o wide --all-namespaces > $WORKSPACE/1t1gem/pods.txt || true
143 '''
144 }
145 }
146
147 stage('Run E2E Tests 1t4gem') {
148 environment {
149 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/1t4gem"
150 }
151 steps {
152 sh '''
Andrea Campanella57735a82021-05-18 13:22:49 +0200153 if [ "${branch}" != "master" ]; then
154 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
155 source "$WORKSPACE/kind-voltha/releases/${branch}"
156 else
157 echo "on master, using default settings for kind-voltha"
158 fi
TorstenThieme582d0342021-01-25 14:16:55 +0000159 cd $WORKSPACE/kind-voltha/
TorstenThieme582d0342021-01-25 14:16:55 +0000160 WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down
161
Matteo Scandolof15a2c22021-05-05 13:21:15 -0700162 export EXTRA_HELM_FLAGS=""
163 if [ "${branch}" != "master" ]; then
164 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
165 source "$WORKSPACE/kind-voltha/releases/${branch}"
166 else
167 echo "on master, using default settings for kind-voltha"
168 fi
TorstenThieme582d0342021-01-25 14:16:55 +0000169 export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} "
170
TorstenThieme326e7972021-01-19 14:27:59 +0000171 # start logging
172 mkdir -p $WORKSPACE/1t4gem
173 _TAG=kail-1t4gem kail -n voltha -n default > $WORKSPACE/1t4gem/onos-voltha-combined.log &
174
TorstenThieme582d0342021-01-25 14:16:55 +0000175 DEPLOY_K8S=n ./voltha up
176
TorstenThieme326e7972021-01-19 14:27:59 +0000177 mkdir -p $ROBOT_LOGS_DIR/1t4gem
178 export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR"
TorstenThieme41c08632021-02-11 11:08:18 +0000179 export KVSTOREPREFIX=voltha_voltha
TorstenThieme326e7972021-01-19 14:27:59 +0000180
TorstenThieme669258d2021-01-29 09:03:10 +0000181 make -C $WORKSPACE/voltha-system-tests ${make1t4gemTestTarget} || true
TorstenThieme326e7972021-01-19 14:27:59 +0000182
183 # stop logging
184 P_IDS="$(ps e -ww -A | grep "_TAG=kail-1t4gem" | grep -v grep | awk '{print $1}')"
185 if [ -n "$P_IDS" ]; then
186 echo $P_IDS
187 for P_ID in $P_IDS; do
188 kill -9 $P_ID
189 done
190 fi
191
192 # get pods information
193 kubectl get pods -o wide --all-namespaces > $WORKSPACE/1t4gem/pods.txt || true
194 '''
195 }
196 }
197
198 stage('Run E2E Tests 1t8gem') {
199 environment {
200 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/1t8gem"
201 }
202 steps {
203 sh '''
Andrea Campanella57735a82021-05-18 13:22:49 +0200204 if [ "${branch}" != "master" ]; then
205 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
206 source "$WORKSPACE/kind-voltha/releases/${branch}"
207 else
208 echo "on master, using default settings for kind-voltha"
209 fi
TorstenThieme582d0342021-01-25 14:16:55 +0000210 cd $WORKSPACE/kind-voltha/
TorstenThieme582d0342021-01-25 14:16:55 +0000211 WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down
212
Matteo Scandolof15a2c22021-05-05 13:21:15 -0700213 export EXTRA_HELM_FLAGS=""
214 if [ "${branch}" != "master" ]; then
215 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
216 source "$WORKSPACE/kind-voltha/releases/${branch}"
217 else
218 echo "on master, using default settings for kind-voltha"
219 fi
TorstenThieme582d0342021-01-25 14:16:55 +0000220 export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} "
221
TorstenThieme326e7972021-01-19 14:27:59 +0000222 # start logging
223 mkdir -p $WORKSPACE/1t8gem
224 _TAG=kail-1t8gem kail -n voltha -n default > $WORKSPACE/1t8gem/onos-voltha-combined.log &
225
226 DEPLOY_K8S=n ./voltha up
227
228 mkdir -p $ROBOT_LOGS_DIR/1t8gem
229 export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR"
TorstenThieme41c08632021-02-11 11:08:18 +0000230 export KVSTOREPREFIX=voltha_voltha
TorstenThieme326e7972021-01-19 14:27:59 +0000231
TorstenThieme669258d2021-01-29 09:03:10 +0000232 make -C $WORKSPACE/voltha-system-tests ${make1t8gemTestTarget} || true
TorstenThieme326e7972021-01-19 14:27:59 +0000233
234 # stop logging
235 P_IDS="$(ps e -ww -A | grep "_TAG=kail-1t8gem" | grep -v grep | awk '{print $1}')"
236 if [ -n "$P_IDS" ]; then
237 echo $P_IDS
238 for P_ID in $P_IDS; do
239 kill -9 $P_ID
240 done
241 fi
242
243 # get pods information
244 kubectl get pods -o wide --all-namespaces > $WORKSPACE/1t8gem/pods.txt || true
245 '''
246 }
247 }
248
249 stage('Run MIB Upload Tests') {
TorstenThieme669258d2021-01-29 09:03:10 +0000250 when { beforeAgent true; expression { return "${olts}" == "1" } }
TorstenThieme326e7972021-01-19 14:27:59 +0000251 environment {
252 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/openonu-go-MIB"
253 }
254 steps {
255 sh '''
Andrea Campanella57735a82021-05-18 13:22:49 +0200256 if [ "${branch}" != "master" ]; then
257 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
258 source "$WORKSPACE/kind-voltha/releases/${branch}"
259 else
260 echo "on master, using default settings for kind-voltha"
261 fi
TorstenThieme326e7972021-01-19 14:27:59 +0000262 cd $WORKSPACE/kind-voltha/
TorstenThieme326e7972021-01-19 14:27:59 +0000263 WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down
264
Matteo Scandolof15a2c22021-05-05 13:21:15 -0700265 export EXTRA_HELM_FLAGS=""
266 if [ "${branch}" != "master" ]; then
267 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
268 source "$WORKSPACE/kind-voltha/releases/${branch}"
269 else
270 echo "on master, using default settings for kind-voltha"
271 fi
TorstenThieme326e7972021-01-19 14:27:59 +0000272 export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} "
TorstenThieme326e7972021-01-19 14:27:59 +0000273 export EXTRA_HELM_FLAGS+="--set pon=2,onu=2,controlledActivation=only-onu "
274
275 # start logging
276 mkdir -p $WORKSPACE/mib
277 _TAG=kail-mib kail -n voltha -n default > $WORKSPACE/mib/onos-voltha-combined.log &
278
279 DEPLOY_K8S=n ./voltha up
280
281 mkdir -p $ROBOT_LOGS_DIR
282 export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR"
283 export TARGET_DEFAULT=mib-upload-templating-openonu-go-adapter-test
284
285 make -C $WORKSPACE/voltha-system-tests \$TARGET_DEFAULT || true
286
287 # stop logging
288 P_IDS="$(ps e -ww -A | grep "_TAG=kail-mib" | grep -v grep | awk '{print $1}')"
289 if [ -n "$P_IDS" ]; then
290 echo $P_IDS
291 for P_ID in $P_IDS; do
292 kill -9 $P_ID
293 done
294 fi
295
296 # get pods information
297 kubectl get pods -o wide --all-namespaces > $WORKSPACE/mib/pods.txt || true
298 '''
299 }
300 }
301
302 stage('Reconcile DT workflow') {
303 environment {
304 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/ReconcileDT"
305 }
306 steps {
307 sh '''
Andrea Campanella57735a82021-05-18 13:22:49 +0200308 if [ "${branch}" != "master" ]; then
309 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
310 source "$WORKSPACE/kind-voltha/releases/${branch}"
311 else
312 echo "on master, using default settings for kind-voltha"
313 fi
TorstenThieme326e7972021-01-19 14:27:59 +0000314 cd $WORKSPACE/kind-voltha/
TorstenThieme326e7972021-01-19 14:27:59 +0000315 WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down
316
Matteo Scandolof15a2c22021-05-05 13:21:15 -0700317 export EXTRA_HELM_FLAGS=""
318 if [ "${branch}" != "master" ]; then
319 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
320 source "$WORKSPACE/kind-voltha/releases/${branch}"
321 else
322 echo "on master, using default settings for kind-voltha"
323 fi
TorstenThieme326e7972021-01-19 14:27:59 +0000324 export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} "
325
326 # Workflow-specific flags
327 export WITH_RADIUS=no
328 export WITH_EAPOL=no
329 export WITH_DHCP=no
330 export WITH_IGMP=no
331 export CONFIG_SADIS="external"
332 export BBSIM_CFG="configs/bbsim-sadis-dt.yaml"
333
334 # start logging
TorstenThiemea223e1e2021-01-29 13:22:14 +0000335 mkdir -p $WORKSPACE/reconciledt
TorstenThieme326e7972021-01-19 14:27:59 +0000336 _TAG=kail-reconcile-dt kail -n voltha -n default > $WORKSPACE/reconciledt/onos-voltha-combined.log &
337
338 DEPLOY_K8S=n ./voltha up
339
340 mkdir -p $ROBOT_LOGS_DIR
341 export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR -e PowerSwitch"
342
TorstenThieme45422612021-03-23 10:38:59 +0000343 make -C $WORKSPACE/voltha-system-tests ${makeReconcileDtTestTarget} || true
TorstenThieme326e7972021-01-19 14:27:59 +0000344
345 # stop logging
346 P_IDS="$(ps e -ww -A | grep "_TAG=kail-reconcile-dt" | grep -v grep | awk '{print $1}')"
347 if [ -n "$P_IDS" ]; then
348 echo $P_IDS
349 for P_ID in $P_IDS; do
350 kill -9 $P_ID
351 done
352 fi
353
354 # get pods information
355 kubectl get pods -o wide --all-namespaces > $WORKSPACE/reconciledt/pods.txt || true
356 '''
357 }
358 }
359
360 stage('Reconcile ATT workflow') {
361 environment {
362 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/ReconcileATT"
363 }
364 steps {
365 sh '''
Andrea Campanella57735a82021-05-18 13:22:49 +0200366 if [ "${branch}" != "master" ]; then
367 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
368 source "$WORKSPACE/kind-voltha/releases/${branch}"
369 else
370 echo "on master, using default settings for kind-voltha"
371 fi
TorstenThieme326e7972021-01-19 14:27:59 +0000372 cd $WORKSPACE/kind-voltha/
373 WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down
374
Matteo Scandolof15a2c22021-05-05 13:21:15 -0700375 export EXTRA_HELM_FLAGS=""
376 if [ "${branch}" != "master" ]; then
377 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
378 source "$WORKSPACE/kind-voltha/releases/${branch}"
379 else
380 echo "on master, using default settings for kind-voltha"
381 fi
TorstenThieme326e7972021-01-19 14:27:59 +0000382 export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} "
383
384 # Workflow-specific flags
385 export WITH_RADIUS=yes
386 export WITH_EAPOL=yes
387 export WITH_BBSIM=yes
388 export DEPLOY_K8S=yes
389 export CONFIG_SADIS="external"
390 export BBSIM_CFG="configs/bbsim-sadis-att.yaml"
391
392 if [ "${gerritProject}" = "voltctl" ]; then
393 export VOLTCTL_VERSION=$(cat $WORKSPACE/voltctl/VERSION)
394 cp $WORKSPACE/voltctl/voltctl $WORKSPACE/kind-voltha/bin/voltctl
395 md5sum $WORKSPACE/kind-voltha/bin/voltctl
396 fi
397
398 # start logging
TorstenThiemea223e1e2021-01-29 13:22:14 +0000399 mkdir -p $WORKSPACE/reconcileatt
TorstenThieme326e7972021-01-19 14:27:59 +0000400 _TAG=kail-reconcile-att kail -n voltha -n default > $WORKSPACE/reconcileatt/onos-voltha-combined.log &
401
402 DEPLOY_K8S=n ./voltha up
403
404 mkdir -p $ROBOT_LOGS_DIR
405 export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR -e PowerSwitch"
406
TorstenThieme45422612021-03-23 10:38:59 +0000407 make -C $WORKSPACE/voltha-system-tests ${makeReconcileTestTarget} || true
TorstenThieme326e7972021-01-19 14:27:59 +0000408
409 # stop logging
410 P_IDS="$(ps e -ww -A | grep "_TAG=kail-reconcile-att" | grep -v grep | awk '{print $1}')"
411 if [ -n "$P_IDS" ]; then
412 echo $P_IDS
413 for P_ID in $P_IDS; do
414 kill -9 $P_ID
415 done
416 fi
417
418 # get pods information
419 kubectl get pods -o wide --all-namespaces > $WORKSPACE/reconcileatt/pods.txt || true
420 '''
421 }
422 }
423
424 stage('Reconcile TT workflow') {
425 environment {
426 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/ReconcileTT"
427 }
428 steps {
429 sh '''
Andrea Campanella57735a82021-05-18 13:22:49 +0200430 if [ "${branch}" != "master" ]; then
431 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
432 source "$WORKSPACE/kind-voltha/releases/${branch}"
433 else
434 echo "on master, using default settings for kind-voltha"
435 fi
TorstenThieme326e7972021-01-19 14:27:59 +0000436 cd $WORKSPACE/kind-voltha/
437 WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down
438
Matteo Scandolof15a2c22021-05-05 13:21:15 -0700439 export EXTRA_HELM_FLAGS=""
440 if [ "${branch}" != "master" ]; then
441 echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
442 source "$WORKSPACE/kind-voltha/releases/${branch}"
443 else
444 echo "on master, using default settings for kind-voltha"
445 fi
TorstenThieme326e7972021-01-19 14:27:59 +0000446 export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} "
447
448 # Workflow-specific flags
449 export WITH_RADIUS=no
450 export WITH_EAPOL=no
451 export WITH_DHCP=yes
452 export WITH_IGMP=yes
453 export CONFIG_SADIS="external"
454 export BBSIM_CFG="configs/bbsim-sadis-tt.yaml"
455
456 # start logging
TorstenThiemea223e1e2021-01-29 13:22:14 +0000457 mkdir -p $WORKSPACE/reconcilett
TorstenThieme326e7972021-01-19 14:27:59 +0000458 _TAG=kail-reconcile-tt kail -n voltha -n default > $WORKSPACE/reconcilett/onos-voltha-combined.log &
459
460 DEPLOY_K8S=n ./voltha up
461
462 mkdir -p $ROBOT_LOGS_DIR
463 export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR -e PowerSwitch"
464
TorstenThieme45422612021-03-23 10:38:59 +0000465 make -C $WORKSPACE/voltha-system-tests ${makeReconcileTtTestTarget} || true
TorstenThieme326e7972021-01-19 14:27:59 +0000466
467 # stop logging
468 P_IDS="$(ps e -ww -A | grep "_TAG=kail-reconcile-tt" | grep -v grep | awk '{print $1}')"
469 if [ -n "$P_IDS" ]; then
470 echo $P_IDS
471 for P_ID in $P_IDS; do
472 kill -9 $P_ID
473 done
474 fi
475
476 # get pods information
477 kubectl get pods -o wide --all-namespaces > $WORKSPACE/reconcilett/pods.txt || true
478 '''
479 }
480 }
481 }
482 post {
483 always {
484 sh '''
TorstenThieme326e7972021-01-19 14:27:59 +0000485 # get pods information
486 kubectl get pods -o wide
487 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}"
488 helm ls
489
490 sync
491 pkill kail || true
492 md5sum $WORKSPACE/kind-voltha/bin/voltctl
493
494 ## Pull out errors from log files
495 extract_errors_go() {
496 echo
497 echo "Error summary for $1:"
498 grep $1 $WORKSPACE/onos-voltha-combined.log | grep '"level":"error"' | cut -d ' ' -f 2- | jq -r '.msg'
499 echo
500 }
501
502 extract_errors_python() {
503 echo
504 echo "Error summary for $1:"
505 grep $1 $WORKSPACE/onos-voltha-combined.log | grep 'ERROR' | cut -d ' ' -f 2-
506 echo
507 }
508
509 extract_errors_go voltha-rw-core > $WORKSPACE/error-report.log || true
510 extract_errors_go adapter-open-olt >> $WORKSPACE/error-report.log || true
511 extract_errors_python adapter-open-onu >> $WORKSPACE/error-report.log || true
512 extract_errors_python voltha-ofagent >> $WORKSPACE/error-report.log || true
513
514 gzip $WORKSPACE/onos-voltha-combined.log || true
515 '''
516 step([$class: 'RobotPublisher',
517 disableArchiveOutput: false,
518 logFileName: 'RobotLogs/*/log*.html',
519 otherFiles: '',
520 outputFileName: 'RobotLogs/*/output*.xml',
521 outputPath: '.',
522 passThreshold: 100,
523 reportFileName: 'RobotLogs/*/report*.html',
524 unstableThreshold: 0]);
525 archiveArtifacts artifacts: '**/*.log,**/*.gz,**/*.txt'
526 }
527 }
528}