[VOL-3780] using keywords in physical build

Change-Id: I6fbe3797f57920b5d8ebb2419c8c2ba6de9d0901
diff --git a/jjb/pipeline/voltha/master/bbsim-tests.groovy b/jjb/pipeline/voltha/master/bbsim-tests.groovy
index 8b02a88..3cc9064 100644
--- a/jjb/pipeline/voltha/master/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/bbsim-tests.groovy
@@ -139,23 +139,11 @@
         ps aux | grep port-forw | grep -v grep | awk '{print \$2}' | xargs --no-run-if-empty kill -9
       """
       // collect pod details
-      get_pods_info("$WORKSPACE/${name}")
+      getPodsInfo("$WORKSPACE/${name}")
       helmTeardown(['infra', 'voltha'])
   }
 }
 
-def get_pods_info(dest) {
-  // collect pod details, this is here in case of failure
-  sh """
-  mkdir -p ${dest}
-  kubectl get pods --all-namespaces -o wide | tee ${dest}/pods.txt || true
-  kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq | tee ${dest}/pod-images.txt || true
-  kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee ${dest}/pod-imagesId.txt || true
-  kubectl describe pods --all-namespaces -l app.kubernetes.io/part-of=voltha > ${dest}/pods-describe.txt
-  helm ls --all-namespaces | tee ${dest}/helm-charts.txt
-  """
-}
-
 pipeline {
 
   /* no label, executor is determined by JJB */
@@ -226,14 +214,14 @@
 
   post {
     aborted {
-      get_pods_info("$WORKSPACE/failed")
+      getPodsInfo("$WORKSPACE/failed")
       sh """
       kubectl logs -n voltha -l app.kubernetes.io/part-of=voltha > $WORKSPACE/failed/voltha.log
       """
       archiveArtifacts artifacts: '**/*.log,**/*.txt'
     }
     failure {
-      get_pods_info("$WORKSPACE/failed")
+      getPodsInfo("$WORKSPACE/failed")
       sh """
       kubectl logs -n voltha -l app.kubernetes.io/part-of=voltha > $WORKSPACE/failed/voltha.logs
       """