Edits to help display error
jjb/pipeline/voltha/master/bbsim-tests.groovy
---------------------------------------------
o This failure is completely silent, no console output or content logged.
o Remove try/catch wrapper around the call to installKind().
o Try/catch is normally verbose calling throw but try and change problem space to expose the problem.
16: 01:04 ** Calling installKind.groovy
16: 01:04 [Pipeline] }
16: 01:04 [Pipeline] // script
16: 01:04 [Pipeline] }
16: 01:04 [Pipeline] // stage
16: 01:04 [Pipeline] stage
16: 01:04 [Pipeline] { (Replace voltctl)
16: 01:04 Stage "Replace voltctl" skipped due to earlier failure(s)
Change-Id: I3103c890054c79fa61dd61d88f238beec4b54093
diff --git a/jjb/pipeline/voltha/master/bbsim-tests.groovy b/jjb/pipeline/voltha/master/bbsim-tests.groovy
index cc79dc7..4f39c8c 100644
--- a/jjb/pipeline/voltha/master/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/bbsim-tests.groovy
@@ -299,43 +299,31 @@
}
}
- stage('Create K8s Cluster')
- {
- steps
+ stage('Create K8s Cluster')
{
- script
+ steps
{
- // Explicit signpost for times when I/O goes silent.
- // ie: At times groovy must be passed jenkinsfile.self to access *.echo()
- println(' ** Calling installKind.groovy')
-
- // non-fatal prototyping
- try
+ script
{
+ // Explicit signpost for times when I/O goes silent.
+ // ie: At times groovy must be passed jenkinsfile.self to access *.echo()
+ println(' ** Calling installKind.groovy: ENTER')
// chicken-n-egg problem, kind command needed
// to determine if kubernetes cluster is active
installKind(self) { debug:true }
- }
- catch (Exception err)
- {
- println("** ${iam}: EXCEPTION ${err}")
- throw err
- }
- finally
- {
- println("** ${iam}: LEAVE")
- }
+ println(' ** Calling installKind.groovy: LEAVE')
- def clusterExists = sh returnStdout: true, script: """
- kind get clusters | grep ${clusterName} | wc -l
- """
- if (clusterExists.trim() == "0")
- {
- createKubernetesCluster([nodes: 3, name: clusterName])
- }
- } // script
- } // steps
- } // stage('Create K8s Cluster')
+ def clusterExists = sh(
+ returnStdout: true,
+ script: """kind get clusters | grep ${clusterName} | wc -l""")
+
+ if (clusterExists.trim() == "0")
+ {
+ createKubernetesCluster([nodes: 3, name: clusterName])
+ }
+ } // script
+ } // steps
+ } // stage('Create K8s Cluster')
stage('Replace voltctl')
{
@@ -400,7 +388,7 @@
{
aborted { collectArtifacts('aborted') }
failure { collectArtifacts('failed') }
- always { collectArtifacts('always') }
+ always { collectArtifacts('always') }
}
} // pipeline