Merge "Using custom image and parameters on TT scale wiht new OLT app Running deletion test in a separate step"
diff --git a/jjb/pipeline/voltha/master/voltha-scale-test.groovy b/jjb/pipeline/voltha/master/voltha-scale-test.groovy
index 6c83c31..13ae4dc 100644
--- a/jjb/pipeline/voltha/master/voltha-scale-test.groovy
+++ b/jjb/pipeline/voltha/master/voltha-scale-test.groovy
@@ -465,7 +465,7 @@
               -v withDhcp:${withDhcp} \
               -v withIgmp:${withIgmp} \
               --noncritical non-critical \
-              -e igmp "
+              -e igmp -e teardown "
 
             if [ ${withEapol} = false ] ; then
               ROBOT_PARAMS+="-e authentication "
@@ -554,6 +554,51 @@
         }
       }
     }
+    stage("Device removal") {
+      options {
+          timeout(time: 5, unit: 'MINUTES')
+      }
+      steps {
+        sh '''
+          set +e
+          mkdir -p $ROBOT_LOGS_DIR
+          cd $WORKSPACE/voltha-system-tests
+          make vst_venv
+        '''
+        script {
+          Exception caughtException = null
+
+          catchError(buildResult: 'SUCCESS', stageResult: 'ABORTED') {
+            try {
+              sh '''
+                ROBOT_PARAMS="--exitonfailure \
+                  -v olt:${olts} \
+                  -v pon:${pons} \
+                  -v onu:${onus} \
+                  -v ONOS_SSH_PORT:30115 \
+                  -v ONOS_REST_PORT:30120 \
+                  -v workflow:${workflow} \
+                  -v withEapol:${withEapol} \
+                  -v withDhcp:${withDhcp} \
+                  -v withIgmp:${withIgmp} \
+                  --noncritical non-critical \
+                  -i teardown"
+
+                  cd $WORKSPACE/voltha-system-tests
+                  source ./vst_venv/bin/activate
+                  robot -d $WORKSPACE/RobotLogs \
+                  $ROBOT_PARAMS tests/scale/Voltha_Scale_Tests.robot
+                '''
+            } catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e) {
+              // if the error is a timeout don't mark the build as failed
+              println "Cleanup test timed out"
+            } catch (Throwable e) {
+              caughtException = e
+            }
+          }
+        }
+      }
+    }
   }
   post {
     always {
diff --git a/jjb/voltha-scale.yaml b/jjb/voltha-scale.yaml
index da23509..a15fda0 100644
--- a/jjb/voltha-scale.yaml
+++ b/jjb/voltha-scale.yaml
@@ -110,8 +110,12 @@
           inMemoryEtcdStorage: false
           extraHelmFlags: >
             --set dhcpRetry=false -f /home/jenkins/voltha-scale/voltha-values.yaml --set etcd.persistence.enabled=true,etcd.persistence.storageClass=longhorn
+            --set global.rpc_timeout=30s,global.adapter_open_onu.timeout=30s,global.adapter_open_olt.timeout=30s,global.adapter_open_olt.rpc_timeout=30s
           onosImg: 'matteoscandolo/voltha-onos:oltapp'
           withMonitoring: false
+          openonuAdapterGoImg: matteoscandolo/voltha-openonu-adapter-go:meter-fix
+          onosStatInterval: 30
+          onosGroupInterval: 30
 
       # jobs for 1024 ONUs with openonu-go and clustered ONOS (2 OLTs)
       - 'voltha-scale-measurements':