[VOL-5100] - periodic-voltha-test-bbsim

vars/installKind.groovy
vars/installKind.sh
-----------------------
  o ERR: installKind() not found.
  o Wrap vars script in a steps{} block for context.
  o installKail uses sh() directly which is an implicit steps block.

Change-Id: I43e815e6a8fd605a008af55b698be20cd703a62a
diff --git a/jjb/pipeline/voltha/master/bbsim-tests.groovy b/jjb/pipeline/voltha/master/bbsim-tests.groovy
index 47e6c10..fc4b661 100644
--- a/jjb/pipeline/voltha/master/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/bbsim-tests.groovy
@@ -61,7 +61,7 @@
 // -----------------------------------------------------------------------
 // Intent: Phase helper method
 // -----------------------------------------------------------------------
-Boolean my_install_kind()
+Boolean install_kind(String name)
 {
     String iam = getIam('installKind')
     Boolean ans = False
@@ -70,7 +70,7 @@
     try
     {
 	println("** ${iam} Running: installKind() { debug:true }"
-	installKind(branch_name)
+	installKind(name)
 	println("** ${iam}: Ran to completion")
 	ans = True // iff
     }
@@ -84,7 +84,7 @@
     {
 	println("** ${iam}: ENTER")
     }
-    
+
     return(ans)
 }
 
@@ -124,7 +124,7 @@
         }
     }
 
-    stage ('Initialize')
+    stage ('Install Kail')
     {
         // VOL-4926 - Is voltha-system-tests available ?
         String cmd = [
@@ -135,15 +135,18 @@
         ].join(' ')
         println(" ** Running: ${cmd}:\n")
         sh("${cmd}")
-
-	// if (! my_install_kail())
+        // if (! my_install_kail())
 	//    throw new Exception('installKail() failed')
-	if (! my_install_kind())
-	    throw new Exception('installKind() failed')
     }
 
+    stage ('Install Kind')
+    {
+        steps
+	{
+	    install_kind(branch_name)
+	}
+    }
 
-    
     stage('Deploy common infrastructure')
     {
         sh '''
@@ -172,7 +175,7 @@
 
           // if we're downloading a voltha-helm-charts patch, then install from a local copy of the charts
           def localCharts = false
-		    
+
           if (volthaHelmChartsChange != ""
 	      || gerritProject == "voltha-helm-charts"
 	      || isReleaseBranch(branch) // branch != 'master'
@@ -416,7 +419,7 @@
                     return gerritProject == "voltctl"
                 }
             }
-		
+
 	    // Hmmmm(?) where did the voltctl download happen ?
 	    // Likely Makefile but would be helpful to document here.
             steps
diff --git a/vars/installKind.groovy b/vars/installKind.groovy
index f3402aa..724c9ef 100644
--- a/vars/installKind.groovy
+++ b/vars/installKind.groovy
@@ -30,13 +30,19 @@
 def process(Map args)
 {
     String iam = getIam('process')
-    println("** ${iam}: ENTER")
+    Boolean ans = true
+
+    println("** ${iam}: ENTER branch=${args.branch}")
     println("args = " + args)
 
     // go install sigs.k8s.io/kind@v0.18.0
-    sh('./installKind.sh')
+    sh(
+	script: './installKind.sh',
+	returnStdout: true
+    )
+
     println("** ${iam}: LEAVE")
-    return
+    return(ans)
 }
 
 // -----------------------------------------------------------------------
@@ -65,6 +71,8 @@
 
     try
     {
+	// Will be passed in eventually
+	Map config = [debug :false, branch:branch]
         process(config)
     }
     catch (Exception err)