TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 1 | // 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 | |
| 19 | pipeline { |
| 20 | |
| 21 | /* no label, executor is determined by JJB */ |
| 22 | agent { |
| 23 | label "${params.buildNode}" |
| 24 | } |
| 25 | options { |
TorstenThieme | 685b89b | 2021-01-28 12:59:23 +0000 | [diff] [blame] | 26 | timeout(time: 130, unit: 'MINUTES') |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 27 | } |
| 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 """ |
| 67 | cd $WORKSPACE/kind-voltha/ |
| 68 | WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down || ./voltha down |
| 69 | """ |
| 70 | } |
| 71 | } |
| 72 | stage('Clone voltha-system-tests') { |
| 73 | steps { |
| 74 | checkout([ |
| 75 | $class: 'GitSCM', |
| 76 | userRemoteConfigs: [[ |
| 77 | url: "https://gerrit.opencord.org/voltha-system-tests", |
| 78 | // refspec: "${volthaSystemTestsChange}" |
| 79 | ]], |
| 80 | branches: [[ name: "${branch}", ]], |
| 81 | extensions: [ |
| 82 | [$class: 'WipeWorkspace'], |
| 83 | [$class: 'RelativeTargetDirectory', relativeTargetDir: "voltha-system-tests"], |
| 84 | [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false], |
| 85 | ], |
| 86 | ]) |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | stage('Deploy Voltha') { |
| 91 | steps { |
| 92 | sh """ |
| 93 | export EXTRA_HELM_FLAGS="" |
| 94 | if [ "${branch}" != "master" ]; then |
| 95 | echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}" |
| 96 | source "$WORKSPACE/kind-voltha/releases/${branch}" |
| 97 | else |
| 98 | echo "on master, using default settings for kind-voltha" |
| 99 | fi |
| 100 | |
| 101 | EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${params.extraHelmFlags} --set defaults.image_registry=mirror.registry.opennetworking.org/ " |
| 102 | |
| 103 | cd $WORKSPACE/kind-voltha/ |
| 104 | ./voltha up |
TorstenThieme | 669258d | 2021-01-29 09:03:10 +0000 | [diff] [blame] | 105 | bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/kind-voltha/bin" |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 106 | """ |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | stage('Run E2E Tests 1t1gem') { |
| 111 | environment { |
| 112 | ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/1t1gem" |
| 113 | } |
| 114 | steps { |
| 115 | sh ''' |
| 116 | # start logging |
| 117 | mkdir -p $WORKSPACE/1t1gem |
| 118 | _TAG=kail-1t1gem kail -n voltha -n default > $WORKSPACE/1t1gem/onos-voltha-combined.log & |
| 119 | |
| 120 | mkdir -p $ROBOT_LOGS_DIR/1t1gem |
| 121 | export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR" |
TorstenThieme | 41c0863 | 2021-02-11 11:08:18 +0000 | [diff] [blame] | 122 | export KVSTOREPREFIX=voltha_voltha |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 123 | |
TorstenThieme | 669258d | 2021-01-29 09:03:10 +0000 | [diff] [blame] | 124 | make -C $WORKSPACE/voltha-system-tests ${makeTarget} || true |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 125 | |
| 126 | # stop logging |
| 127 | P_IDS="$(ps e -ww -A | grep "_TAG=kail-1t1gem" | grep -v grep | awk '{print $1}')" |
| 128 | if [ -n "$P_IDS" ]; then |
| 129 | echo $P_IDS |
| 130 | for P_ID in $P_IDS; do |
| 131 | kill -9 $P_ID |
| 132 | done |
| 133 | fi |
| 134 | |
| 135 | # get pods information |
| 136 | kubectl get pods -o wide --all-namespaces > $WORKSPACE/1t1gem/pods.txt || true |
| 137 | ''' |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | stage('Run E2E Tests 1t4gem') { |
| 142 | environment { |
| 143 | ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/1t4gem" |
| 144 | } |
| 145 | steps { |
| 146 | sh ''' |
TorstenThieme | 582d034 | 2021-01-25 14:16:55 +0000 | [diff] [blame] | 147 | cd $WORKSPACE/kind-voltha/ |
TorstenThieme | 582d034 | 2021-01-25 14:16:55 +0000 | [diff] [blame] | 148 | WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down |
| 149 | |
| 150 | export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} " |
| 151 | |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 152 | # start logging |
| 153 | mkdir -p $WORKSPACE/1t4gem |
| 154 | _TAG=kail-1t4gem kail -n voltha -n default > $WORKSPACE/1t4gem/onos-voltha-combined.log & |
| 155 | |
TorstenThieme | 582d034 | 2021-01-25 14:16:55 +0000 | [diff] [blame] | 156 | DEPLOY_K8S=n ./voltha up |
| 157 | |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 158 | mkdir -p $ROBOT_LOGS_DIR/1t4gem |
| 159 | export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR" |
TorstenThieme | 41c0863 | 2021-02-11 11:08:18 +0000 | [diff] [blame] | 160 | export KVSTOREPREFIX=voltha_voltha |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 161 | |
TorstenThieme | 669258d | 2021-01-29 09:03:10 +0000 | [diff] [blame] | 162 | make -C $WORKSPACE/voltha-system-tests ${make1t4gemTestTarget} || true |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 163 | |
| 164 | # stop logging |
| 165 | P_IDS="$(ps e -ww -A | grep "_TAG=kail-1t4gem" | grep -v grep | awk '{print $1}')" |
| 166 | if [ -n "$P_IDS" ]; then |
| 167 | echo $P_IDS |
| 168 | for P_ID in $P_IDS; do |
| 169 | kill -9 $P_ID |
| 170 | done |
| 171 | fi |
| 172 | |
| 173 | # get pods information |
| 174 | kubectl get pods -o wide --all-namespaces > $WORKSPACE/1t4gem/pods.txt || true |
| 175 | ''' |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | stage('Run E2E Tests 1t8gem') { |
| 180 | environment { |
| 181 | ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/1t8gem" |
| 182 | } |
| 183 | steps { |
| 184 | sh ''' |
TorstenThieme | 582d034 | 2021-01-25 14:16:55 +0000 | [diff] [blame] | 185 | cd $WORKSPACE/kind-voltha/ |
TorstenThieme | 582d034 | 2021-01-25 14:16:55 +0000 | [diff] [blame] | 186 | WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down |
| 187 | |
| 188 | export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} " |
| 189 | |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 190 | # start logging |
| 191 | mkdir -p $WORKSPACE/1t8gem |
| 192 | _TAG=kail-1t8gem kail -n voltha -n default > $WORKSPACE/1t8gem/onos-voltha-combined.log & |
| 193 | |
| 194 | DEPLOY_K8S=n ./voltha up |
| 195 | |
| 196 | mkdir -p $ROBOT_LOGS_DIR/1t8gem |
| 197 | export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR" |
TorstenThieme | 41c0863 | 2021-02-11 11:08:18 +0000 | [diff] [blame] | 198 | export KVSTOREPREFIX=voltha_voltha |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 199 | |
TorstenThieme | 669258d | 2021-01-29 09:03:10 +0000 | [diff] [blame] | 200 | make -C $WORKSPACE/voltha-system-tests ${make1t8gemTestTarget} || true |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 201 | |
| 202 | # stop logging |
| 203 | P_IDS="$(ps e -ww -A | grep "_TAG=kail-1t8gem" | grep -v grep | awk '{print $1}')" |
| 204 | if [ -n "$P_IDS" ]; then |
| 205 | echo $P_IDS |
| 206 | for P_ID in $P_IDS; do |
| 207 | kill -9 $P_ID |
| 208 | done |
| 209 | fi |
| 210 | |
| 211 | # get pods information |
| 212 | kubectl get pods -o wide --all-namespaces > $WORKSPACE/1t8gem/pods.txt || true |
| 213 | ''' |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | stage('Run MIB Upload Tests') { |
TorstenThieme | 669258d | 2021-01-29 09:03:10 +0000 | [diff] [blame] | 218 | when { beforeAgent true; expression { return "${olts}" == "1" } } |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 219 | environment { |
| 220 | ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/openonu-go-MIB" |
| 221 | } |
| 222 | steps { |
| 223 | sh ''' |
| 224 | cd $WORKSPACE/kind-voltha/ |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 225 | WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down |
| 226 | |
| 227 | export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} " |
| 228 | |
| 229 | export EXTRA_HELM_FLAGS+="--set pon=2,onu=2,controlledActivation=only-onu " |
| 230 | |
| 231 | # start logging |
| 232 | mkdir -p $WORKSPACE/mib |
| 233 | _TAG=kail-mib kail -n voltha -n default > $WORKSPACE/mib/onos-voltha-combined.log & |
| 234 | |
| 235 | DEPLOY_K8S=n ./voltha up |
| 236 | |
| 237 | mkdir -p $ROBOT_LOGS_DIR |
| 238 | export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR" |
| 239 | export TARGET_DEFAULT=mib-upload-templating-openonu-go-adapter-test |
| 240 | |
| 241 | make -C $WORKSPACE/voltha-system-tests \$TARGET_DEFAULT || true |
| 242 | |
| 243 | # stop logging |
| 244 | P_IDS="$(ps e -ww -A | grep "_TAG=kail-mib" | grep -v grep | awk '{print $1}')" |
| 245 | if [ -n "$P_IDS" ]; then |
| 246 | echo $P_IDS |
| 247 | for P_ID in $P_IDS; do |
| 248 | kill -9 $P_ID |
| 249 | done |
| 250 | fi |
| 251 | |
| 252 | # get pods information |
| 253 | kubectl get pods -o wide --all-namespaces > $WORKSPACE/mib/pods.txt || true |
| 254 | ''' |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | stage('Reconcile DT workflow') { |
TorstenThieme | 669258d | 2021-01-29 09:03:10 +0000 | [diff] [blame] | 259 | when { beforeAgent true; expression { return "${olts}" == "1" } } |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 260 | environment { |
| 261 | ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/ReconcileDT" |
| 262 | } |
| 263 | steps { |
| 264 | sh ''' |
| 265 | cd $WORKSPACE/kind-voltha/ |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 266 | WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down |
| 267 | |
| 268 | export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} " |
| 269 | |
| 270 | # Workflow-specific flags |
| 271 | export WITH_RADIUS=no |
| 272 | export WITH_EAPOL=no |
| 273 | export WITH_DHCP=no |
| 274 | export WITH_IGMP=no |
| 275 | export CONFIG_SADIS="external" |
| 276 | export BBSIM_CFG="configs/bbsim-sadis-dt.yaml" |
| 277 | |
| 278 | # start logging |
TorstenThieme | a223e1e | 2021-01-29 13:22:14 +0000 | [diff] [blame] | 279 | mkdir -p $WORKSPACE/reconciledt |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 280 | _TAG=kail-reconcile-dt kail -n voltha -n default > $WORKSPACE/reconciledt/onos-voltha-combined.log & |
| 281 | |
| 282 | DEPLOY_K8S=n ./voltha up |
| 283 | |
| 284 | mkdir -p $ROBOT_LOGS_DIR |
| 285 | export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR -e PowerSwitch" |
| 286 | |
| 287 | export TARGET=reconcile-openonu-go-adapter-test-dt |
| 288 | |
| 289 | |
| 290 | make -C $WORKSPACE/voltha-system-tests \$TARGET || true |
| 291 | |
| 292 | # stop logging |
| 293 | P_IDS="$(ps e -ww -A | grep "_TAG=kail-reconcile-dt" | grep -v grep | awk '{print $1}')" |
| 294 | if [ -n "$P_IDS" ]; then |
| 295 | echo $P_IDS |
| 296 | for P_ID in $P_IDS; do |
| 297 | kill -9 $P_ID |
| 298 | done |
| 299 | fi |
| 300 | |
| 301 | # get pods information |
| 302 | kubectl get pods -o wide --all-namespaces > $WORKSPACE/reconciledt/pods.txt || true |
| 303 | ''' |
| 304 | } |
| 305 | } |
| 306 | |
| 307 | stage('Reconcile ATT workflow') { |
TorstenThieme | 669258d | 2021-01-29 09:03:10 +0000 | [diff] [blame] | 308 | when { beforeAgent true; expression { return "${olts}" == "1" } } |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 309 | environment { |
| 310 | ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/ReconcileATT" |
| 311 | } |
| 312 | steps { |
| 313 | sh ''' |
| 314 | cd $WORKSPACE/kind-voltha/ |
| 315 | WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down |
| 316 | |
| 317 | export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} " |
| 318 | |
| 319 | # Workflow-specific flags |
| 320 | export WITH_RADIUS=yes |
| 321 | export WITH_EAPOL=yes |
| 322 | export WITH_BBSIM=yes |
| 323 | export DEPLOY_K8S=yes |
| 324 | export CONFIG_SADIS="external" |
| 325 | export BBSIM_CFG="configs/bbsim-sadis-att.yaml" |
| 326 | |
| 327 | if [ "${gerritProject}" = "voltctl" ]; then |
| 328 | export VOLTCTL_VERSION=$(cat $WORKSPACE/voltctl/VERSION) |
| 329 | cp $WORKSPACE/voltctl/voltctl $WORKSPACE/kind-voltha/bin/voltctl |
| 330 | md5sum $WORKSPACE/kind-voltha/bin/voltctl |
| 331 | fi |
| 332 | |
| 333 | # start logging |
TorstenThieme | a223e1e | 2021-01-29 13:22:14 +0000 | [diff] [blame] | 334 | mkdir -p $WORKSPACE/reconcileatt |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 335 | _TAG=kail-reconcile-att kail -n voltha -n default > $WORKSPACE/reconcileatt/onos-voltha-combined.log & |
| 336 | |
| 337 | DEPLOY_K8S=n ./voltha up |
| 338 | |
| 339 | mkdir -p $ROBOT_LOGS_DIR |
| 340 | export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR -e PowerSwitch" |
| 341 | |
| 342 | export TARGET=reconcile-openonu-go-adapter-test |
| 343 | |
| 344 | |
| 345 | make -C $WORKSPACE/voltha-system-tests \$TARGET || true |
| 346 | |
| 347 | # stop logging |
| 348 | P_IDS="$(ps e -ww -A | grep "_TAG=kail-reconcile-att" | grep -v grep | awk '{print $1}')" |
| 349 | if [ -n "$P_IDS" ]; then |
| 350 | echo $P_IDS |
| 351 | for P_ID in $P_IDS; do |
| 352 | kill -9 $P_ID |
| 353 | done |
| 354 | fi |
| 355 | |
| 356 | # get pods information |
| 357 | kubectl get pods -o wide --all-namespaces > $WORKSPACE/reconcileatt/pods.txt || true |
| 358 | ''' |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | stage('Reconcile TT workflow') { |
TorstenThieme | 669258d | 2021-01-29 09:03:10 +0000 | [diff] [blame] | 363 | when { beforeAgent true; expression { return "${olts}" == "1" } } |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 364 | environment { |
| 365 | ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/ReconcileTT" |
| 366 | } |
| 367 | steps { |
| 368 | sh ''' |
| 369 | cd $WORKSPACE/kind-voltha/ |
| 370 | WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down |
| 371 | |
| 372 | export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} " |
| 373 | |
| 374 | # Workflow-specific flags |
| 375 | export WITH_RADIUS=no |
| 376 | export WITH_EAPOL=no |
| 377 | export WITH_DHCP=yes |
| 378 | export WITH_IGMP=yes |
| 379 | export CONFIG_SADIS="external" |
| 380 | export BBSIM_CFG="configs/bbsim-sadis-tt.yaml" |
| 381 | |
| 382 | # start logging |
TorstenThieme | a223e1e | 2021-01-29 13:22:14 +0000 | [diff] [blame] | 383 | mkdir -p $WORKSPACE/reconcilett |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 384 | _TAG=kail-reconcile-tt kail -n voltha -n default > $WORKSPACE/reconcilett/onos-voltha-combined.log & |
| 385 | |
| 386 | DEPLOY_K8S=n ./voltha up |
| 387 | |
| 388 | mkdir -p $ROBOT_LOGS_DIR |
| 389 | export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR -e PowerSwitch" |
| 390 | |
| 391 | export TARGET=reconcile-openonu-go-adapter-test-tt |
| 392 | |
| 393 | make -C $WORKSPACE/voltha-system-tests \$TARGET || true |
| 394 | |
| 395 | # stop logging |
| 396 | P_IDS="$(ps e -ww -A | grep "_TAG=kail-reconcile-tt" | grep -v grep | awk '{print $1}')" |
| 397 | if [ -n "$P_IDS" ]; then |
| 398 | echo $P_IDS |
| 399 | for P_ID in $P_IDS; do |
| 400 | kill -9 $P_ID |
| 401 | done |
| 402 | fi |
| 403 | |
| 404 | # get pods information |
| 405 | kubectl get pods -o wide --all-namespaces > $WORKSPACE/reconcilett/pods.txt || true |
| 406 | ''' |
| 407 | } |
| 408 | } |
| 409 | } |
| 410 | post { |
| 411 | always { |
| 412 | sh ''' |
TorstenThieme | 326e797 | 2021-01-19 14:27:59 +0000 | [diff] [blame] | 413 | # get pods information |
| 414 | kubectl get pods -o wide |
| 415 | kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" |
| 416 | helm ls |
| 417 | |
| 418 | sync |
| 419 | pkill kail || true |
| 420 | md5sum $WORKSPACE/kind-voltha/bin/voltctl |
| 421 | |
| 422 | ## Pull out errors from log files |
| 423 | extract_errors_go() { |
| 424 | echo |
| 425 | echo "Error summary for $1:" |
| 426 | grep $1 $WORKSPACE/onos-voltha-combined.log | grep '"level":"error"' | cut -d ' ' -f 2- | jq -r '.msg' |
| 427 | echo |
| 428 | } |
| 429 | |
| 430 | extract_errors_python() { |
| 431 | echo |
| 432 | echo "Error summary for $1:" |
| 433 | grep $1 $WORKSPACE/onos-voltha-combined.log | grep 'ERROR' | cut -d ' ' -f 2- |
| 434 | echo |
| 435 | } |
| 436 | |
| 437 | extract_errors_go voltha-rw-core > $WORKSPACE/error-report.log || true |
| 438 | extract_errors_go adapter-open-olt >> $WORKSPACE/error-report.log || true |
| 439 | extract_errors_python adapter-open-onu >> $WORKSPACE/error-report.log || true |
| 440 | extract_errors_python voltha-ofagent >> $WORKSPACE/error-report.log || true |
| 441 | |
| 442 | gzip $WORKSPACE/onos-voltha-combined.log || true |
| 443 | ''' |
| 444 | step([$class: 'RobotPublisher', |
| 445 | disableArchiveOutput: false, |
| 446 | logFileName: 'RobotLogs/*/log*.html', |
| 447 | otherFiles: '', |
| 448 | outputFileName: 'RobotLogs/*/output*.xml', |
| 449 | outputPath: '.', |
| 450 | passThreshold: 100, |
| 451 | reportFileName: 'RobotLogs/*/report*.html', |
| 452 | unstableThreshold: 0]); |
| 453 | archiveArtifacts artifacts: '**/*.log,**/*.gz,**/*.txt' |
| 454 | } |
| 455 | } |
| 456 | } |