VOL-4926 - godownloader no longer available.

vars/createKubernetesCluster.groovy
vars/startComponentsLogs.groovy
jjb/pipeline/voltha/master/dmi-build-and-test.groovy
jjb/pipeline/voltha/master/voltha-dt-physical-functional-tests.groovy
jjb/pipeline/voltha/master/voltha-physical-functional-tests.groovy
jjb/pipeline/voltha/master/voltha-physical-soak-dt-tests.groovy
jjb/pipeline/voltha/master/voltha-tt-physical-functional-tests.groovy
jjb/pipeline/voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy
jjb/pipeline/voltha/voltha-2.8/voltha-physical-functional-tests.groovy
jjb/pipeline/voltha/voltha-2.8/voltha-physical-soak-dt-tests.groovy
jjb/pipeline/voltha/voltha-2.8/voltha-tt-physical-functional-tests.groovy
-------------------------------------------------------------------------
  o Install kail using the makefile target defined in repo:voltha-system-tests.
  o Update copyright notice to std format + 2023.
  o Remove command existence logic, implcit test using make dependencies.
  o Added whitespace between stage declarations and fixed some indentation
    to improve readability.

Change-Id: Id04b89b4583fde1b2202bc5de07ef613713e5e7e
diff --git a/jjb/pipeline/voltha/master/dmi-build-and-test.groovy b/jjb/pipeline/voltha/master/dmi-build-and-test.groovy
index 926da46..6d66a53 100755
--- a/jjb/pipeline/voltha/master/dmi-build-and-test.groovy
+++ b/jjb/pipeline/voltha/master/dmi-build-and-test.groovy
@@ -1,4 +1,6 @@
-// Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
+#!/usr/bin/env groovy
+// -----------------------------------------------------------------------
+// Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,11 +13,12 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-
-// used to deploy VOLTHA and configure ONOS physical PODs
-
+// -----------------------------------------------------------------------
+// Intent: used to deploy VOLTHA and configure ONOS physical PODs
+//
 // NOTE we are importing the library even if it's global so that it's
 // easier to change the keywords during a replay
+// -----------------------------------------------------------------------
 
 library identifier: 'cord-jenkins-libraries@master',
     retriever: modernSCM([
@@ -196,16 +199,14 @@
         """
       }
     }
-    stage('Start logging') {
-      steps {
-        // check if kail is installed and if not installs it
-        sh """
-        if ! command -v kail &> /dev/null
-        then
-            bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
-        fi
-        """
-        sh returnStdout: false, script: '''
+	stage('Start logging')
+	{
+	    steps
+	    {
+		// Install kail
+		sh("""make -C "$WORKSPACE/voltha-system-tests" KAIL_PATH="$WORKSPACE/bin" kail""")
+
+		sh returnStdout: false, script: '''
           # start logging with kail
           cd $WORKSPACE
           mkdir -p $LOG_FOLDER
@@ -216,9 +217,10 @@
             _TAG=kail-$app kail -l app.kubernetes.io/name=$app --since 1h > $LOG_FOLDER/$app.log&
           done
         '''
-      }
-    }
-    stage('Reinstall OLT software') {
+	    }
+	}
+
+	stage('Reinstall OLT software') {
       steps {
         script {
           if ( params.reinstallOlt ) {
diff --git a/jjb/pipeline/voltha/master/voltha-dt-physical-functional-tests.groovy b/jjb/pipeline/voltha/master/voltha-dt-physical-functional-tests.groovy
index 864ca3b..5a14eab 100644
--- a/jjb/pipeline/voltha/master/voltha-dt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/master/voltha-dt-physical-functional-tests.groovy
@@ -1,4 +1,6 @@
-// Copyright 2017-2022 Open Networking Foundation (ONF) and the ONF Contributors
+#!/usr/bin/env groovy
+// -----------------------------------------------------------------------
+// Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,6 +13,7 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
+// -----------------------------------------------------------------------
 
 library identifier: 'cord-jenkins-libraries@master',
     retriever: modernSCM([
@@ -114,20 +117,20 @@
         JENKINS_NODE_COOKIE="dontKillMe" _TAG="kafka" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${infraNamespace} svc/voltha-infra-kafka 9092:9092; done"&
         ps aux | grep port-forward
         """
-        sh """
-        ps -ef | grep port-forward
-        """
-        sh returnStdout: false, script: """
-        mkdir -p $WORKSPACE/bin
-        # download kail
-        bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
+
+        sh("""ps -ef | grep port-forward""")
+
+        sh(returnStdout: false, script: """
+        mkdir -p "$WORKSPACE/bin"
+
+        # install kail
+        make -C "$WORKSPACE/voltha-system-tests" KAIL_PATH="$WORKSPACE/bin" kail
 
         # Default kind-voltha config doesn't work on ONF demo pod for accessing kvstore.
         # The issue is that the mgmt node is also one of the k8s nodes and so port forwarding doesn't work.
         # We should change this. In the meantime here is a workaround.
            set +e
 
-
         # Remove noise from voltha-core logs
            voltctl log level set WARN read-write-core#github.com/opencord/voltha-go/db/model
            voltctl log level set WARN read-write-core#github.com/opencord/voltha-lib-go/v3/pkg/kafka
@@ -135,7 +138,7 @@
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/db
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/probe
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/kafka
-        """
+        """)
       }
     }
 
diff --git a/jjb/pipeline/voltha/master/voltha-physical-functional-tests.groovy b/jjb/pipeline/voltha/master/voltha-physical-functional-tests.groovy
index 1031cf9..8565148 100644
--- a/jjb/pipeline/voltha/master/voltha-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/master/voltha-physical-functional-tests.groovy
@@ -1,4 +1,6 @@
-// Copyright 2017-2022 Open Networking Foundation (ONF) and the ONF Contributors
+#!/usr/bin/env groovy
+// -----------------------------------------------------------------------
+// Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,6 +13,7 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
+// -----------------------------------------------------------------------
 
 library identifier: 'cord-jenkins-libraries@master',
     retriever: modernSCM([
@@ -95,11 +98,14 @@
         script {
           deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
         }
-        installVoltctl("${branch}")
-        sh returnStdout: false, script: """
-        mkdir -p $WORKSPACE/bin
-        # download kail
-        bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
+	installVoltctl("${branch}")
+	
+	sh(returnStdout: false, script: """
+
+        mkdir -p "$WORKSPACE/bin"
+
+        # install kail
+        make -C "$WORKSPACE/voltha-system-tests" KAIL_PATH="$WORKSPACE/bin" kail
 
         if [ "${params.branch}" == "master" ]; then
         # Default kind-voltha config doesn't work on ONF demo pod for accessing kvstore.
@@ -115,7 +121,7 @@
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/probe
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/kafka
         fi
-        """
+        """)
       }
     }
 
diff --git a/jjb/pipeline/voltha/master/voltha-physical-soak-dt-tests.groovy b/jjb/pipeline/voltha/master/voltha-physical-soak-dt-tests.groovy
index 5e655ce..6320cfb 100644
--- a/jjb/pipeline/voltha/master/voltha-physical-soak-dt-tests.groovy
+++ b/jjb/pipeline/voltha/master/voltha-physical-soak-dt-tests.groovy
@@ -1,4 +1,6 @@
-// Copyright 2017-2022 Open Networking Foundation (ONF) and the ONF Contributors
+#!/usr/bin/env groovy
+// -----------------------------------------------------------------------
+// Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,6 +13,7 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
+// -----------------------------------------------------------------------
 
 library identifier: 'cord-jenkins-libraries@master',
     retriever: modernSCM([
@@ -101,10 +104,13 @@
            deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
         }
         installVoltctl("${branch}")
-        sh returnStdout: false, script: """
-        mkdir -p $WORKSPACE/bin
-        # download kail
-        bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
+
+	sh(returnStdout: false, script: """
+
+        mkdir -p "$WORKSPACE/bin"
+
+        # install kail
+        make -C "$WORKSPACE/voltha-system-tests" KAIL_PATH="$WORKSPACE/bin" kail
 
         if [ "${params.branch}" == "master" ]; then
         # Default kind-voltha config doesn't work on ONF demo pod for accessing kvstore.
@@ -120,15 +126,16 @@
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/probe
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/kafka
         fi
-        """
-        sh """
+        """)
+
+        sh("""
         mkdir -p $WORKSPACE/voltha-pods-mem-consumption
         cd $WORKSPACE/voltha-system-tests
         make vst_venv
         source ./vst_venv/bin/activate || true
         # Collect initial memory consumption
         python scripts/mem_consumption.py -o $WORKSPACE/voltha-pods-mem-consumption -a 0.0.0.0:31301 -n ${volthaNamespace} || true
-        """
+        """)
       }
     }
 
@@ -247,3 +254,5 @@
     }
   }
 }
+
+// [EOF]
diff --git a/jjb/pipeline/voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy b/jjb/pipeline/voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy
index 369808a..0a34a35 100644
--- a/jjb/pipeline/voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-2.8/voltha-dt-physical-functional-tests.groovy
@@ -1,4 +1,6 @@
-// Copyright 2017-present Open Networking Foundation
+#!/usr/bin/env groovy
+// -----------------------------------------------------------------------
+// Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,6 +13,7 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
+// -----------------------------------------------------------------------
 
 library identifier: 'cord-jenkins-libraries@master',
     retriever: modernSCM([
@@ -75,10 +78,12 @@
            deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
         }
         installVoltctl("${branch}")
-        sh returnStdout: false, script: """
-        mkdir -p $WORKSPACE/bin
-        # download kail
-        bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
+
+	sh(returnStdout: false, script: """
+        mkdir -p "$WORKSPACE/bin"
+
+        # install kail
+        make -C "$WORKSPACE/voltha-system-tests" KAIL_PATH="$WORKSPACE/bin" kail
 
         # Default kind-voltha config doesn't work on ONF demo pod for accessing kvstore.
         # The issue is that the mgmt node is also one of the k8s nodes and so port forwarding doesn't work.
@@ -86,7 +91,6 @@
         if [ "${params.branch}" == "master" ]; then
            set +e
 
-
         # Remove noise from voltha-core logs
            voltctl log level set WARN read-write-core#github.com/opencord/voltha-go/db/model
            voltctl log level set WARN read-write-core#github.com/opencord/voltha-lib-go/v3/pkg/kafka
@@ -95,7 +99,7 @@
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/probe
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/kafka
         fi
-        """
+        """)
       }
     }
 
diff --git a/jjb/pipeline/voltha/voltha-2.8/voltha-physical-functional-tests.groovy b/jjb/pipeline/voltha/voltha-2.8/voltha-physical-functional-tests.groovy
index 040bb0c..b8c5fd8 100644
--- a/jjb/pipeline/voltha/voltha-2.8/voltha-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-2.8/voltha-physical-functional-tests.groovy
@@ -1,4 +1,6 @@
-// Copyright 2017-present Open Networking Foundation
+#!/usr/bin/env groovy
+// -----------------------------------------------------------------------
+// Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,6 +13,7 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
+// -----------------------------------------------------------------------
 
 library identifier: 'cord-jenkins-libraries@master',
     retriever: modernSCM([
@@ -88,10 +91,12 @@
           deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
         }
         installVoltctl("${branch}")
-        sh returnStdout: false, script: """
-        mkdir -p $WORKSPACE/bin
-        # download kail
-        bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
+
+	sh(returnStdout: false, script: """
+        mkdir -p "$WORKSPACE/bin"
+
+        # install kail
+        make -C "$WORKSPACE/voltha-system-tests" KAIL_PATH="$WORKSPACE/bin" kail
 
         if [ "${params.branch}" == "master" ]; then
         # Default kind-voltha config doesn't work on ONF demo pod for accessing kvstore.
@@ -107,7 +112,7 @@
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/probe
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/kafka
         fi
-        """
+        """)
       }
     }
 
@@ -250,3 +255,5 @@
     }
   }
 }
+
+// [EOF]
diff --git a/jjb/pipeline/voltha/voltha-2.8/voltha-physical-soak-dt-tests.groovy b/jjb/pipeline/voltha/voltha-2.8/voltha-physical-soak-dt-tests.groovy
index 17cb701..d795813 100644
--- a/jjb/pipeline/voltha/voltha-2.8/voltha-physical-soak-dt-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-2.8/voltha-physical-soak-dt-tests.groovy
@@ -1,4 +1,6 @@
-// Copyright 2017-present Open Networking Foundation
+#!/usr/bin/env groovy
+// -----------------------------------------------------------------------
+// Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,6 +13,7 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
+// -----------------------------------------------------------------------
 
 library identifier: 'cord-jenkins-libraries@master',
     retriever: modernSCM([
@@ -101,10 +104,12 @@
            deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
         }
         installVoltctl("${branch}")
-        sh returnStdout: false, script: """
-        mkdir -p $WORKSPACE/bin
-        # download kail
-        bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
+
+        sh(returnStdout: false, script: """
+        mkdir -p "$WORKSPACE/bin"
+
+        # install kail
+        make -C "$WORKSPACE/voltha-system-tests" KAIL_PATH="$WORKSPACE/bin" kail
 
         if [ "${params.branch}" == "master" ]; then
         # Default kind-voltha config doesn't work on ONF demo pod for accessing kvstore.
@@ -120,7 +125,7 @@
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/probe
            voltctl log level set WARN adapter-open-olt#github.com/opencord/voltha-lib-go/v3/pkg/kafka
         fi
-        """
+        """)
       }
     }
 
@@ -237,3 +242,5 @@
     }
   }
 }
+
+// [EOF]
diff --git a/jjb/pipeline/voltha/voltha-2.8/voltha-tt-physical-functional-tests.groovy b/jjb/pipeline/voltha/voltha-2.8/voltha-tt-physical-functional-tests.groovy
index a139b7a..40b61fa 100644
--- a/jjb/pipeline/voltha/voltha-2.8/voltha-tt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-2.8/voltha-tt-physical-functional-tests.groovy
@@ -1,4 +1,6 @@
-// Copyright 2017-present Open Networking Foundation
+#!/usr/bin/env groovy
+// -----------------------------------------------------------------------
+// Copyright 2021-2023 Open Networking Foundation (ONF) and the ONF Contributors
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,6 +13,7 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
+// -----------------------------------------------------------------------
 
 library identifier: 'cord-jenkins-libraries@master',
     retriever: modernSCM([
@@ -101,9 +104,10 @@
         }
         installVoltctl("${branch}")
         sh returnStdout: false, script: """
-        mkdir -p $WORKSPACE/bin
-        # download kail
-        bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
+        mkdir -p "$WORKSPACE/bin"
+
+        # install kail
+        make -C "$WORKSPACE/voltha-system-tests" KAIL_PATH="$WORKSPACE/bin" kail
 
         # Default kind-voltha config doesn't work on ONF demo pod for accessing kvstore.
         # The issue is that the mgmt node is also one of the k8s nodes and so port forwarding doesn't work.
@@ -111,7 +115,6 @@
         if [ "${params.branch}" == "master" ]; then
            set +e
 
-
         # Remove noise from voltha-core logs
            voltctl log level set WARN read-write-core#github.com/opencord/voltha-go/db/model
            voltctl log level set WARN read-write-core#github.com/opencord/voltha-lib-go/v3/pkg/kafka
@@ -132,7 +135,7 @@
       }
       steps {
         sh """
-        mkdir -p $ROBOT_LOGS_DIR
+        mkdir -p "$ROBOT_LOGS_DIR"
         if ( ${powerSwitch} ); then
              export ROBOT_MISC_ARGS="--removekeywords wuks -i functionalTT -i PowerSwitch -i sanityTT -i sanityTT-MCAST -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}"
         else
diff --git a/vars/createKubernetesCluster.groovy b/vars/createKubernetesCluster.groovy
index fd22546..a0df895 100644
--- a/vars/createKubernetesCluster.groovy
+++ b/vars/createKubernetesCluster.groovy
@@ -1,6 +1,20 @@
 #!/usr/bin/env groovy
 // -----------------------------------------------------------------------
-// sets up a kubernetes cluster (using kind)
+// Copyright 2021-2023 Open Networking Foundation (ONF) and the ONF Contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// -----------------------------------------------------------------------
+// Intent: sets up a kubernetes cluster (using kind)
 // -----------------------------------------------------------------------
 
 // -----------------------------------------------------------------------
@@ -91,12 +105,12 @@
       mkdir -p $HOME/.kube
       kind get kubeconfig --name ${cfg.name} > $HOME/.kube/config
 
-      make -C "$WORKSPACE/voltha-system-tests" KAIL_PATH="$WORKSPACE/bin" kail || true
-
-      # download kail
-      bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
+      # install kail
+      make -C "$WORKSPACE/voltha-system-tests" KAIL_PATH="$WORKSPACE/bin" kail
   """
 
     println("** ${iam}: LEAVE")
     return
 }
+
+// [EOF]
diff --git a/vars/startComponentsLogs.groovy b/vars/startComponentsLogs.groovy
index a485be4..f62d70f 100644
--- a/vars/startComponentsLogs.groovy
+++ b/vars/startComponentsLogs.groovy
@@ -1,13 +1,47 @@
+#!/usr/bin/env groovy
+// -----------------------------------------------------------------------
+// Copyright 2021-2023 Open Networking Foundation (ONF) and the ONF Contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// -----------------------------------------------------------------------
+// Intent:
 // check if kail is installed, if not installs it
 // and then uses it to collect logs on specified containers
-
+//
 // appsToLog is a list of kubernetes labels used by kail to get the logs
 // the generated log file is named with the string after =
 // for example app=bbsim will generate a file called bbsim.log
-
+//
 // to archive the logs use: archiveArtifacts artifacts: '${logsDir}/*.log'
+// -----------------------------------------------------------------------
+
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+def getIam(String func)
+{
+    // Cannot rely on a stack trace due to jenkins manipulation
+    String src = 'vars/startComponentLogs.groovy'
+    String iam = [src, func].join('::')
+    return iam
+}
+
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
 def call(Map config) {
 
+    String iam = getIam('main')
+    println("** ${iam}: ENTER")
+
     def tagPrefix = "jenkins"
 
     def defaultConfig = [
@@ -32,14 +66,9 @@
     def cfg = defaultConfig + config
 
     // check if kail is installed and if not installs it
-    sh """
-    if ! command -v kail &> /dev/null
-    then
-        bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/bin"
-    fi
-    """
+    sh("""make -C "$WORKSPACE/voltha-system-tests" KAIL_PATH="$WORKSPACE/bin" kail""")
 
-    // fi the logsDir does not exists dir() will create it
+    // if logsDir does not exists dir() will create it
     dir(cfg.logsDir) {
         for(int i = 0;i<cfg.appsToLog.size();i++) {
             def label = cfg.appsToLog[i]
@@ -51,4 +80,9 @@
             """
         }
     }
-}
\ No newline at end of file
+
+    println("** ${iam}: LEAVE")
+    return
+}
+
+// [EOF]