bbsim related fixes
jjb/pipeline/voltha/master/bbsim-tests.groovy
o Remove self from installKind() call.
o Jenkins script object pointer needed for passing but syntax {self,this,etc} not correct.
vars/iam.groovy
vars/installKind.groovy
-----------------------
o Why do languages still support this snowflake condition ?!?
o Remove comma separator from the final argument specified in a function declaration.
o Simplified editing when removal of trailing delimiter is not a requirement.
o Always code lines with delimiter results in no potential for a syntax error with edits.
Change-Id: I8989c1cf2e783ffc49a99f470a3484c3205fb254
diff --git a/jjb/pipeline/voltha/master/bbsim-tests.groovy b/jjb/pipeline/voltha/master/bbsim-tests.groovy
index 4f39c8c..32c55ba 100644
--- a/jjb/pipeline/voltha/master/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/bbsim-tests.groovy
@@ -310,7 +310,7 @@
println(' ** Calling installKind.groovy: ENTER')
// chicken-n-egg problem, kind command needed
// to determine if kubernetes cluster is active
- installKind(self) { debug:true }
+ installKind() { debug:true }
println(' ** Calling installKind.groovy: LEAVE')
def clusterExists = sh(
diff --git a/vars/iam.groovy b/vars/iam.groovy
index 845bdd0..e50fc8d 100644
--- a/vars/iam.groovy
+++ b/vars/iam.groovy
@@ -32,7 +32,7 @@
String iam = [src, func].join('::')
if (argv.containsKey('version'))
{
- iam += sprintf("[%s]", argv.version)
+ iam += sprintf('[%s]', argv.version)
}
return(iam)
}
@@ -112,7 +112,7 @@
// -----------------------------------------------------------------------
Boolean call\
(
- Closure body, // jenkins closure attached to the call iam() {closure}
+ Closure body // jenkins closure attached to the call iam() {closure}
// def self, // jenkins env object for access to primitives like echo()
)
{
@@ -140,9 +140,7 @@
ranToCompletion = true
}
}
- /* groovylint-disable*/ /* yuck! */
catch (Exception err)
- /* groovylint-enable */
{
println("** ${iam}: EXCEPTION ${err}")
throw err
diff --git a/vars/installKind.groovy b/vars/installKind.groovy
index 3638508..e22281b 100644
--- a/vars/installKind.groovy
+++ b/vars/installKind.groovy
@@ -64,7 +64,7 @@
// -----------------------------------------------------------------------
Boolean call\
(
- def self, // jenkins env object for access to primitives like echo()
+ // def self, // jenkins env object for access to primitives like echo()
Closure body // jenkins closure attached to the call iam() {closure}
)
{