blob: a3f708349dd7c2816515f5e2484580a6c73f0db1 [file] [log] [blame]
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -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
15node {
16 // Need this so that deployment_config has global scope when it's read later
17 deployment_config = null
18}
19
20pipeline {
21 /* no label, executor is determined by JJB */
22 agent {
23 label "${params.buildNode}"
24 }
25 options {
Suchitra Vemurieccd4a22020-10-07 15:26:39 -070026 timeout(time: 340, unit: 'MINUTES')
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -070027 }
28
29 environment {
30 KUBECONFIG="$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf"
31 VOLTCONFIG="$HOME/.volt/config-minimal"
32 PATH="$WORKSPACE/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
33 }
34
35 stages {
Matteo Scandolo3dce2a12020-09-15 14:21:14 -070036 stage('Clone kind-voltha') {
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -070037 steps {
38 step([$class: 'WsCleanup'])
Matteo Scandolo3dce2a12020-09-15 14:21:14 -070039 checkout([
40 $class: 'GitSCM',
41 userRemoteConfigs: [[
42 url: "https://gerrit.opencord.org/kind-voltha",
Matteo Scandoloa42c6f52020-09-19 01:35:12 +000043 refspec: "${kindVolthaChange}"
Matteo Scandolo3dce2a12020-09-15 14:21:14 -070044 ]],
45 branches: [[ name: "master", ]],
46 extensions: [
47 [$class: 'WipeWorkspace'],
48 [$class: 'RelativeTargetDirectory', relativeTargetDir: "kind-voltha"],
49 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
50 ],
51 ])
52 }
53 }
54 stage('Clone voltha-system-tests') {
55 steps {
56 checkout([
57 $class: 'GitSCM',
58 userRemoteConfigs: [[
59 url: "https://gerrit.opencord.org/voltha-system-tests",
Matteo Scandoloa42c6f52020-09-19 01:35:12 +000060 refspec: "${volthaSystemTestsChange}"
Matteo Scandolo3dce2a12020-09-15 14:21:14 -070061 ]],
62 branches: [[ name: "${branch}", ]],
63 extensions: [
64 [$class: 'WipeWorkspace'],
65 [$class: 'RelativeTargetDirectory', relativeTargetDir: "voltha-system-tests"],
66 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
67 ],
68 ])
69 }
70 }
71 stage('Clone cord-tester') {
72 steps {
73 checkout([
74 $class: 'GitSCM',
75 userRemoteConfigs: [[
76 url: "https://gerrit.opencord.org/cord-tester",
Matteo Scandoloa42c6f52020-09-19 01:35:12 +000077 refspec: "${cordTesterChange}"
Matteo Scandolo3dce2a12020-09-15 14:21:14 -070078 ]],
79 branches: [[ name: "master", ]],
80 extensions: [
81 [$class: 'WipeWorkspace'],
82 [$class: 'RelativeTargetDirectory', relativeTargetDir: "cord-tester"],
83 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
84 ],
85 ])
86 }
87 }
Matteo Scandolo92a5cb62020-09-15 16:02:08 -070088 // This checkout allows us to show changes in Jenkins
89 // we only do this on master as we don't branch all the repos for all the releases
90 // (we should compute the difference by tracking the container version, not the code)
91 stage('Download All the VOLTHA repos') {
92 when {
93 expression {
94 return "${branch}" == 'master';
95 }
96 }
97 steps {
98 checkout(changelog: true,
99 poll: false,
100 scm: [$class: 'RepoScm',
101 manifestRepositoryUrl: "${params.manifestUrl}",
102 manifestBranch: "${params.branch}",
103 currentBranch: true,
104 destinationDir: 'voltha',
105 forceSync: true,
106 resetFirst: true,
107 quiet: true,
108 jobs: 4,
109 showAllChanges: true]
110 )
111 }
112 }
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700113 stage ('Initialize') {
114 steps {
Suchitra Vemuri2a5a5ea2020-03-27 22:53:11 -0700115 sh returnStdout: false, script: "git clone -b master ${cordRepoUrl}/${configBaseDir}"
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700116 script {
117 deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
118 }
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700119 sh returnStdout: false, script: """
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700120 mkdir -p $WORKSPACE/bin
121 bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
122 cd $WORKSPACE
Suchitra Vemuri13421432020-06-05 17:34:33 -0700123 if [ "${params.branch}" != "master" ]; then
124 cd $WORKSPACE/kind-voltha
125 source releases/${params.branch}
Suchitra Vemuri13421432020-06-05 17:34:33 -0700126 else
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700127 VOLTCTL_VERSION=\$(curl -sSL https://api.github.com/repos/opencord/voltctl/releases/latest | jq -r .tag_name | sed -e 's/^v//g')
Suchitra Vemuri13421432020-06-05 17:34:33 -0700128 fi
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700129
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700130 HOSTOS=\$(uname -s | tr "[:upper:]" "[:lower:"])
131 HOSTARCH=\$(uname -m | tr "[:upper:]" "[:lower:"])
132 if [ \$HOSTARCH == "x86_64" ]; then
133 HOSTARCH="amd64"
134 fi
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700135 curl -o $WORKSPACE/bin/voltctl -sSL https://github.com/opencord/voltctl/releases/download/v\${VOLTCTL_VERSION}/voltctl-\${VOLTCTL_VERSION}-\${HOSTOS}-\${HOSTARCH}
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700136 chmod 755 $WORKSPACE/bin/voltctl
137 voltctl version --clientonly
Andrea Campanella9b234332020-04-24 12:22:18 +0200138
Matteo Scandolo3fbb0652020-07-22 08:50:02 -0700139
Andrea Campanella9b234332020-04-24 12:22:18 +0200140 # Default kind-voltha config doesn't work on ONF demo pod for accessing kvstore.
141 # The issue is that the mgmt node is also one of the k8s nodes and so port forwarding doesn't work.
142 # We should change this. In the meantime here is a workaround.
Suchitra Vemuri13421432020-06-05 17:34:33 -0700143 if [ "${params.branch}" == "master" ]; then
144 set +e
Andrea Campanella9b234332020-04-24 12:22:18 +0200145
Andrea Campanella9b234332020-04-24 12:22:18 +0200146
147 # Remove noise from voltha-core logs
Suchitra Vemuria2a7f2c2020-06-08 14:05:06 -0700148 voltctl log level set WARN read-write-core#github.com/opencord/voltha-go/db/model
149 voltctl log level set WARN read-write-core#github.com/opencord/voltha-lib-go/v3/pkg/kafka
Andrea Campanella9b234332020-04-24 12:22:18 +0200150 # Remove noise from openolt logs
Suchitra Vemuria2a7f2c2020-06-08 14:05:06 -0700151 voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/db
152 voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/probe
153 voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/kafka
Suchitra Vemuri13421432020-06-05 17:34:33 -0700154 fi
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700155 """
156 }
157 }
158
159 stage('Functional Tests') {
160 environment {
Suchitra Vemurie4a5bcc2020-03-16 12:43:03 -0700161 ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700162 ROBOT_FILE="Voltha_DT_PODTests.robot"
Andrea Campanellad924ce22020-04-20 16:40:41 +0200163 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/FunctionalTests"
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700164 }
165 steps {
166 sh """
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700167 cd $WORKSPACE/kind-voltha/scripts
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700168 ./log-collector.sh > /dev/null &
169 ./log-combine.sh > /dev/null &
170
171 mkdir -p $ROBOT_LOGS_DIR
Suchitra Vemuri627786a2020-06-18 16:52:05 -0700172 if ( ${powerSwitch} ); then
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100173 export ROBOT_MISC_ARGS="--removekeywords wuks -i PowerSwitch -i sanityDt -i functionalDt -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
Suchitra Vemuri627786a2020-06-18 16:52:05 -0700174 else
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100175 export ROBOT_MISC_ARGS="--removekeywords wuks -e PowerSwitch -i sanityDt -i functionalDt -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
Suchitra Vemuri627786a2020-06-18 16:52:05 -0700176 fi
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700177 make -C $WORKSPACE/voltha-system-tests voltha-dt-test || true
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700178 """
179 }
180 }
Andrea Campanellad924ce22020-04-20 16:40:41 +0200181
Andrea Campanellaf47a1982020-04-21 11:53:31 +0200182 stage('Failure/Recovery Tests') {
183 environment {
184 ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
185 ROBOT_FILE="Voltha_DT_FailureScenarios.robot"
186 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/FailureScenarios"
187 }
188 steps {
189 sh """
190 mkdir -p $ROBOT_LOGS_DIR
191 if ( ${powerSwitch} ); then
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100192 export ROBOT_MISC_ARGS="--removekeywords wuks -L TRACE -i functionalDt -i PowerSwitch -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
Andrea Campanellaf47a1982020-04-21 11:53:31 +0200193 else
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100194 export ROBOT_MISC_ARGS="--removekeywords wuks -L TRACE -i functionalDt -e PowerSwitch -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
Andrea Campanellaf47a1982020-04-21 11:53:31 +0200195 fi
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700196 make -C $WORKSPACE/voltha-system-tests voltha-dt-test || true
Andrea Campanellaf47a1982020-04-21 11:53:31 +0200197 """
198 }
199 }
200
Andy Bavier5ad87c92020-05-11 16:31:35 -0700201 stage('Dataplane Tests') {
202 environment {
Andy Bavier1541da82020-05-15 09:41:38 -0700203 ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
Andy Bavier5ad87c92020-05-11 16:31:35 -0700204 ROBOT_FILE="Voltha_DT_PODTests.robot"
205 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/DataplaneTests"
206 }
207 steps {
208 sh """
209 mkdir -p $ROBOT_LOGS_DIR
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100210 export ROBOT_MISC_ARGS="--removekeywords wuks -i dataplaneDt -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700211 make -C $WORKSPACE/voltha-system-tests voltha-dt-test || true
Andy Bavier5ad87c92020-05-11 16:31:35 -0700212 """
213 }
214 }
Suchitra Vemuri5e8e7892020-09-14 16:04:12 -0700215 stage('HA Tests') {
216 environment {
217 ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
218 ROBOT_FILE="Voltha_ONOSHATests.robot"
219 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/ONOSHAScenarios"
220 }
221 steps {
222 sh """
223 mkdir -p $ROBOT_LOGS_DIR
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100224 export ROBOT_MISC_ARGS="--removekeywords wuks -L TRACE -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v workflow:${params.workFlow} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700225 make -C $WORKSPACE/voltha-system-tests voltha-test || true
Suchitra Vemuri5e8e7892020-09-14 16:04:12 -0700226 """
227 }
228 }
Andy Bavier5ad87c92020-05-11 16:31:35 -0700229
Suchitra Vemuri0a9c8c62020-12-07 18:24:31 -0800230 stage('Multiple OLT Tests') {
231 environment {
232 ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
233 ROBOT_FILE="Voltha_DT_MultiOLT_Tests.robot"
234 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/MultipleOLTScenarios"
235 }
236 steps {
237 sh """
238 mkdir -p $ROBOT_LOGS_DIR
239 if ( ${powerSwitch} ); then
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100240 export ROBOT_MISC_ARGS="--removekeywords wuks -L TRACE -i functionalDt -i PowerSwitch -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
Suchitra Vemuri0a9c8c62020-12-07 18:24:31 -0800241 else
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100242 export ROBOT_MISC_ARGS="--removekeywords wuks -L TRACE -i functionalDt -e PowerSwitch -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
Suchitra Vemuri0a9c8c62020-12-07 18:24:31 -0800243 fi
244 make -C $WORKSPACE/voltha-system-tests voltha-dt-test || true
245 """
246 }
247 }
248
249
Andrea Campanellad924ce22020-04-20 16:40:41 +0200250 stage('Error Scenario Tests') {
251 environment {
252 ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
253 ROBOT_FILE="Voltha_ErrorScenarios.robot"
254 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/ErrorScenarios"
255 }
256 steps {
257 sh """
258 mkdir -p $ROBOT_LOGS_DIR
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100259 export ROBOT_MISC_ARGS="--removekeywords wuks -L TRACE -i functional -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v workflow:${params.workFlow} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE -v OLT_ADAPTER_APP_LABEL:${oltAdapterAppLabel}"
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700260 make -C $WORKSPACE/voltha-system-tests voltha-test || true
Andrea Campanellad924ce22020-04-20 16:40:41 +0200261 """
262 }
Andrea Campanella71666372020-04-21 10:56:17 +0200263 }
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700264 }
265 post {
266 always {
267 sh returnStdout: false, script: '''
268 set +e
Matteo Scandolo97b12572020-04-13 12:44:46 -0700269 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq
270 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700271 kubectl get nodes -o wide
272 kubectl get pods -n voltha -o wide
Suchitra Vemuri179643b2020-11-02 10:06:20 -0800273 kubectl get pods -o wide
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700274
275 sleep 60 # Wait for log-collector and log-combine to complete
276
277 # Clean up "announcer" pod used by the tests if present
278 kubectl delete pod announcer || true
279
280 ## Pull out errors from log files
281 extract_errors_go() {
282 echo
283 echo "Error summary for $1:"
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700284 grep '"level":"error"' $WORKSPACE/kind-voltha/scripts/logger/combined/$1*
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700285 echo
286 }
287
288 extract_errors_python() {
289 echo
290 echo "Error summary for $1:"
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700291 grep 'ERROR' $WORKSPACE/kind-voltha/scripts/logger/combined/$1*
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700292 echo
293 }
294
295 extract_errors_go voltha-rw-core > $WORKSPACE/error-report.log
296 extract_errors_go adapter-open-olt >> $WORKSPACE/error-report.log
297 extract_errors_python adapter-open-onu >> $WORKSPACE/error-report.log
298 extract_errors_python voltha-ofagent >> $WORKSPACE/error-report.log
299 extract_errors_python onos >> $WORKSPACE/error-report.log
300
Andrea Campanella9a95cb72020-09-03 11:28:35 +0200301 gzip error-report.log || true
Andrea Campanellac9c80682020-09-30 12:02:01 +0200302 rm error-report.log || true
Andrea Campanella9a95cb72020-09-03 11:28:35 +0200303
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700304 cd $WORKSPACE/kind-voltha/scripts/logger/combined/
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700305 tar czf $WORKSPACE/container-logs.tgz *
Andrea Campanellac9c80682020-09-30 12:02:01 +0200306 rm * || true
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700307
308 cd $WORKSPACE
309 gzip *-combined.log || true
Andrea Campanellac9c80682020-09-30 12:02:01 +0200310 rm *-combined.log || true
Matteo Scandolo3fbb0652020-07-22 08:50:02 -0700311
312 # collect ETCD cluster logs
313 mkdir -p $WORKSPACE/etcd
Girish Gowdra3eb96f62020-10-15 12:48:34 -0700314 printf '%s\n' $(kubectl get pods -l app=etcd -o=jsonpath="{.items[*]['metadata.name']}") | xargs -I% bash -c "kubectl logs % > $WORKSPACE/etcd/%.log"
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700315 '''
316 script {
317 deployment_config.olts.each { olt ->
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100318 if (olt.type == null || olt.type == "" || olt.type == "openolt") {
319 sh returnStdout: false, script: """
320 sshpass -p ${olt.pass} scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${olt.user}@${olt.sship}:/var/log/openolt.log $WORKSPACE/openolt-${olt.sship}.log || true
321 sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/openolt-${olt.sship}.log # Remove escape sequences
322 sshpass -p ${olt.pass} scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${olt.user}@${olt.sship}:/var/log/dev_mgmt_daemon.log $WORKSPACE/dev_mgmt_daemon-${olt.sship}.log || true
323 sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/dev_mgmt_daemon-${olt.sship}.log # Remove escape sequences
324 sshpass -p ${olt.pass} scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${olt.user}@${olt.sship}:/var/log/startup.log $WORKSPACE/startup-${olt.sship}.log || true
325 sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/startup-${olt.sship}.log || true # Remove escape sequences
326 sshpass -p ${olt.pass} scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${olt.user}@${olt.sship}:/var/log/openolt_process_watchdog.log $WORKSPACE/openolt_process_watchdog-${olt.sship}.log || true
327 sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/openolt_process_watchdog-${olt.sship}.log || true # Remove escape sequences
328 """
329 }
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700330 }
331 }
332 step([$class: 'RobotPublisher',
333 disableArchiveOutput: false,
334 logFileName: '**/log*.html',
335 otherFiles: '',
336 outputFileName: '**/output*.xml',
337 outputPath: 'RobotLogs',
338 passThreshold: 100,
339 reportFileName: '**/report*.html',
340 unstableThreshold: 0
341 ]);
Matteo Scandolo3fbb0652020-07-22 08:50:02 -0700342 archiveArtifacts artifacts: '*.log,*.gz,*.tgz,etcd/*.log'
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700343 }
344 unstable {
345 step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false])
346 }
347 }
348}