blob: cd9475391acf054d9aa01d0fc8ced02f949825b9 [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 Vemuri6ec07572021-02-22 10:47:05 -080026 timeout(time: 640, 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 voltha-system-tests') {
37 steps {
Matteo Scandolo67842812021-07-13 16:52:13 -070038 step([$class: 'WsCleanup'])
Matteo Scandolo3dce2a12020-09-15 14:21:14 -070039 checkout([
40 $class: 'GitSCM',
41 userRemoteConfigs: [[
42 url: "https://gerrit.opencord.org/voltha-system-tests",
Matteo Scandoloa42c6f52020-09-19 01:35:12 +000043 refspec: "${volthaSystemTestsChange}"
Matteo Scandolo3dce2a12020-09-15 14:21:14 -070044 ]],
Suchitra Vemuri1143ae32021-03-26 01:08:37 +000045 branches: [[ name: "${branch}", ]],
Matteo Scandolo3dce2a12020-09-15 14:21:14 -070046 extensions: [
47 [$class: 'WipeWorkspace'],
48 [$class: 'RelativeTargetDirectory', relativeTargetDir: "voltha-system-tests"],
49 [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
50 ],
51 ])
Suchitra Vemuria38e5412021-02-23 15:28:28 -080052 script {
53 sh(script:"""
54 if [ '${volthaSystemTestsChange}' != '' ] ; then
55 cd $WORKSPACE/voltha-system-tests;
56 git fetch https://gerrit.opencord.org/voltha-system-tests ${volthaSystemTestsChange} && git checkout FETCH_HEAD
57 fi
58 """)
59 }
Matteo Scandolo3dce2a12020-09-15 14:21:14 -070060 }
61 }
Matteo Scandolo92a5cb62020-09-15 16:02:08 -070062 // This checkout allows us to show changes in Jenkins
63 // we only do this on master as we don't branch all the repos for all the releases
64 // (we should compute the difference by tracking the container version, not the code)
65 stage('Download All the VOLTHA repos') {
66 when {
67 expression {
68 return "${branch}" == 'master';
69 }
70 }
71 steps {
72 checkout(changelog: true,
73 poll: false,
74 scm: [$class: 'RepoScm',
75 manifestRepositoryUrl: "${params.manifestUrl}",
76 manifestBranch: "${params.branch}",
77 currentBranch: true,
78 destinationDir: 'voltha',
79 forceSync: true,
80 resetFirst: true,
81 quiet: true,
82 jobs: 4,
83 showAllChanges: true]
84 )
85 }
86 }
Matteo Scandolo3dce2a12020-09-15 14:21:14 -070087 stage ('Initialize') {
88 steps {
Hardik Windlass6f854a12021-07-12 13:20:21 +000089 sh returnStdout: false, script: "git clone -b ${branch} ${cordRepoUrl}/${configBaseDir}"
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -070090 script {
91 deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
92 }
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -070093 sh returnStdout: false, script: """
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -070094 mkdir -p $WORKSPACE/bin
95 bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
96 cd $WORKSPACE
Hardik Windlass6f854a12021-07-12 13:20:21 +000097 if [ "${params.branch}" == "voltha-2.8" ]; then
98 VOLTCTL_VERSION=1.6.10
Suchitra Vemuri13421432020-06-05 17:34:33 -070099 else
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700100 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 -0700101 fi
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700102
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700103 HOSTOS=\$(uname -s | tr "[:upper:]" "[:lower:"])
104 HOSTARCH=\$(uname -m | tr "[:upper:]" "[:lower:"])
105 if [ \$HOSTARCH == "x86_64" ]; then
106 HOSTARCH="amd64"
107 fi
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700108 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 -0700109 chmod 755 $WORKSPACE/bin/voltctl
110 voltctl version --clientonly
Andrea Campanella9b234332020-04-24 12:22:18 +0200111
Matteo Scandolo3fbb0652020-07-22 08:50:02 -0700112
Andrea Campanella9b234332020-04-24 12:22:18 +0200113 # Default kind-voltha config doesn't work on ONF demo pod for accessing kvstore.
114 # The issue is that the mgmt node is also one of the k8s nodes and so port forwarding doesn't work.
115 # We should change this. In the meantime here is a workaround.
Suchitra Vemuri13421432020-06-05 17:34:33 -0700116 if [ "${params.branch}" == "master" ]; then
117 set +e
Andrea Campanella9b234332020-04-24 12:22:18 +0200118
Andrea Campanella9b234332020-04-24 12:22:18 +0200119
120 # Remove noise from voltha-core logs
Suchitra Vemuria2a7f2c2020-06-08 14:05:06 -0700121 voltctl log level set WARN read-write-core#github.com/opencord/voltha-go/db/model
122 voltctl log level set WARN read-write-core#github.com/opencord/voltha-lib-go/v3/pkg/kafka
Andrea Campanella9b234332020-04-24 12:22:18 +0200123 # Remove noise from openolt logs
Suchitra Vemuria2a7f2c2020-06-08 14:05:06 -0700124 voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/db
125 voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/probe
126 voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/kafka
Suchitra Vemuri13421432020-06-05 17:34:33 -0700127 fi
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700128 """
129 }
130 }
131
132 stage('Functional Tests') {
133 environment {
Suchitra Vemurie4a5bcc2020-03-16 12:43:03 -0700134 ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700135 ROBOT_FILE="Voltha_DT_PODTests.robot"
Andrea Campanellad924ce22020-04-20 16:40:41 +0200136 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/FunctionalTests"
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700137 }
138 steps {
Matteo Scandolo7b64b6d2021-07-15 12:07:02 -0700139 startComponentsLogs([logsDir: "$WORKSPACE/logs/FunctionalTests"])
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700140 sh """
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700141 mkdir -p $ROBOT_LOGS_DIR
Suchitra Vemuri627786a2020-06-18 16:52:05 -0700142 if ( ${powerSwitch} ); then
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100143 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 -0700144 else
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100145 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 -0700146 fi
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700147 make -C $WORKSPACE/voltha-system-tests voltha-dt-test || true
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700148 """
Matteo Scandolo7b64b6d2021-07-15 12:07:02 -0700149 stopComponentsLogs([logsDir: "$WORKSPACE/logs/FunctionalTests", compress: true])
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700150 }
151 }
Andrea Campanellad924ce22020-04-20 16:40:41 +0200152
Andrea Campanellaf47a1982020-04-21 11:53:31 +0200153 stage('Failure/Recovery Tests') {
154 environment {
155 ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
156 ROBOT_FILE="Voltha_DT_FailureScenarios.robot"
157 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/FailureScenarios"
158 }
159 steps {
Matteo Scandolo7b64b6d2021-07-15 12:07:02 -0700160 startComponentsLogs([logsDir: "$WORKSPACE/logs/FailureScenarios"])
Andrea Campanellaf47a1982020-04-21 11:53:31 +0200161 sh """
162 mkdir -p $ROBOT_LOGS_DIR
163 if ( ${powerSwitch} ); then
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100164 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 +0200165 else
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100166 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 +0200167 fi
Matteo Scandolo3dce2a12020-09-15 14:21:14 -0700168 make -C $WORKSPACE/voltha-system-tests voltha-dt-test || true
Andrea Campanellaf47a1982020-04-21 11:53:31 +0200169 """
Matteo Scandolo7b64b6d2021-07-15 12:07:02 -0700170 stopComponentsLogs([logsDir: "$WORKSPACE/logs/FailureScenarios", compress: true])
Andrea Campanellaf47a1982020-04-21 11:53:31 +0200171 }
172 }
173
Andy Bavier5ad87c92020-05-11 16:31:35 -0700174 stage('Dataplane Tests') {
175 environment {
Andy Bavier1541da82020-05-15 09:41:38 -0700176 ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
Andy Bavier5ad87c92020-05-11 16:31:35 -0700177 ROBOT_FILE="Voltha_DT_PODTests.robot"
178 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/DataplaneTests"
179 }
180 steps {
Matteo Scandolo7b64b6d2021-07-15 12:07:02 -0700181 startComponentsLogs([logsDir: "$WORKSPACE/logs/DataplaneTests"])
Andy Bavier5ad87c92020-05-11 16:31:35 -0700182 sh """
183 mkdir -p $ROBOT_LOGS_DIR
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100184 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 -0700185 make -C $WORKSPACE/voltha-system-tests voltha-dt-test || true
Andy Bavier5ad87c92020-05-11 16:31:35 -0700186 """
Matteo Scandolo7b64b6d2021-07-15 12:07:02 -0700187 stopComponentsLogs([logsDir: "$WORKSPACE/logs/DataplaneTests", compress: true])
Andy Bavier5ad87c92020-05-11 16:31:35 -0700188 }
189 }
Suchitra Vemuri5e8e7892020-09-14 16:04:12 -0700190 stage('HA Tests') {
191 environment {
192 ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
193 ROBOT_FILE="Voltha_ONOSHATests.robot"
194 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/ONOSHAScenarios"
195 }
196 steps {
Matteo Scandolo7b64b6d2021-07-15 12:07:02 -0700197 startComponentsLogs([logsDir: "$WORKSPACE/logs/ONOSHAScenarios"])
Matteo Scandolo67842812021-07-13 16:52:13 -0700198 sh """
199 mkdir -p $ROBOT_LOGS_DIR
200 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}"
201 make -C $WORKSPACE/voltha-system-tests voltha-test || true
202 """
Matteo Scandolo7b64b6d2021-07-15 12:07:02 -0700203 stopComponentsLogs([logsDir: "$WORKSPACE/logs/ONOSHAScenarios", compress: true])
Suchitra Vemuri5e8e7892020-09-14 16:04:12 -0700204 }
205 }
Andy Bavier5ad87c92020-05-11 16:31:35 -0700206
Suchitra Vemuri0a9c8c62020-12-07 18:24:31 -0800207 stage('Multiple OLT Tests') {
208 environment {
209 ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
210 ROBOT_FILE="Voltha_DT_MultiOLT_Tests.robot"
211 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/MultipleOLTScenarios"
212 }
213 steps {
Matteo Scandolo7b64b6d2021-07-15 12:07:02 -0700214 startComponentsLogs([logsDir: "$WORKSPACE/logs/ONOSHAScenarios"])
Suchitra Vemuri0a9c8c62020-12-07 18:24:31 -0800215 sh """
216 mkdir -p $ROBOT_LOGS_DIR
217 if ( ${powerSwitch} ); then
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100218 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 -0800219 else
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100220 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 -0800221 fi
222 make -C $WORKSPACE/voltha-system-tests voltha-dt-test || true
223 """
Matteo Scandolo7b64b6d2021-07-15 12:07:02 -0700224 stopComponentsLogs([logsDir: "$WORKSPACE/logs/ONOSHAScenarios", compress: true])
Suchitra Vemuri0a9c8c62020-12-07 18:24:31 -0800225 }
226 }
227
228
Andrea Campanellad924ce22020-04-20 16:40:41 +0200229 stage('Error Scenario Tests') {
230 environment {
231 ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
232 ROBOT_FILE="Voltha_ErrorScenarios.robot"
233 ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/ErrorScenarios"
234 }
235 steps {
Matteo Scandolo7b64b6d2021-07-15 12:07:02 -0700236 startComponentsLogs([logsDir: "$WORKSPACE/logs/ErrorScenarios"])
Andrea Campanellad924ce22020-04-20 16:40:41 +0200237 sh """
238 mkdir -p $ROBOT_LOGS_DIR
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100239 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 -0700240 make -C $WORKSPACE/voltha-system-tests voltha-test || true
Andrea Campanellad924ce22020-04-20 16:40:41 +0200241 """
Matteo Scandolo7b64b6d2021-07-15 12:07:02 -0700242 stopComponentsLogs([logsDir: "$WORKSPACE/logs/ErrorScenarios", compress: true])
Andrea Campanellad924ce22020-04-20 16:40:41 +0200243 }
Andrea Campanella71666372020-04-21 10:56:17 +0200244 }
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700245 }
246 post {
247 always {
248 sh returnStdout: false, script: '''
249 set +e
Matteo Scandolo97b12572020-04-13 12:44:46 -0700250 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq
251 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700252 kubectl get nodes -o wide
253 kubectl get pods -n voltha -o wide
Suchitra Vemuri179643b2020-11-02 10:06:20 -0800254 kubectl get pods -o wide
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700255
Andrea Campanellaa20a9332021-03-09 09:18:42 +0100256 # store information on running charts
257 helm ls > $WORKSPACE/helm-list.txt || true
258
259 # store information on the running pods
Andrea Campanellae0c839f2021-03-16 17:53:40 +0100260 kubectl get pods --all-namespaces -o wide > $WORKSPACE/pods.txt || true
Andrea Campanellaa20a9332021-03-09 09:18:42 +0100261 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq | tee $WORKSPACE/pod-images.txt || true
262 kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee $WORKSPACE/pod-imagesId.txt || true
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700263 '''
264 script {
265 deployment_config.olts.each { olt ->
Andrea Campanella0d3110c2021-01-20 12:25:45 +0100266 if (olt.type == null || olt.type == "" || olt.type == "openolt") {
267 sh returnStdout: false, script: """
268 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
269 sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/openolt-${olt.sship}.log # Remove escape sequences
270 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
271 sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/dev_mgmt_daemon-${olt.sship}.log # Remove escape sequences
272 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
273 sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/startup-${olt.sship}.log || true # Remove escape sequences
274 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
275 sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/openolt_process_watchdog-${olt.sship}.log || true # Remove escape sequences
276 """
277 }
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700278 }
279 }
280 step([$class: 'RobotPublisher',
281 disableArchiveOutput: false,
282 logFileName: '**/log*.html',
283 otherFiles: '',
284 outputFileName: '**/output*.xml',
285 outputPath: 'RobotLogs',
286 passThreshold: 100,
287 reportFileName: '**/report*.html',
Andrea Campanellaabc09772021-06-16 12:08:57 +0200288 unstableThreshold: 0,
289 onlyCritical: true
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700290 ]);
Matteo Scandolo67842812021-07-13 16:52:13 -0700291 archiveArtifacts artifacts: '**/*.log,**/*.tgz,*.txt'
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700292 }
Suchitra Vemuri8d180ab2020-03-12 17:38:24 -0700293 }
294}