Strip call() down to bare syntax, no parameters only a closure body with arguments
Change-Id: I09797d5819e701f76f6cfeb6a4bc2bebd88cd304
diff --git a/jjb/pipeline/voltha/playground/physical-build.groovy b/jjb/pipeline/voltha/playground/physical-build.groovy
index e337f43..fc931d5 100644
--- a/jjb/pipeline/voltha/playground/physical-build.groovy
+++ b/jjb/pipeline/voltha/playground/physical-build.groovy
@@ -100,7 +100,7 @@
{
steps
{
- iam(this)
+ iam
{
enter = true
label = getIam()
@@ -112,7 +112,7 @@
volthaHelmChartsChange: "${volthaHelmChartsChange}",
])
- iam(this)
+ iam
{
leave = true
label = getIam()
diff --git a/jjb/pipeline/voltha/playground/voltha-tt-physical-functional-tests.groovy b/jjb/pipeline/voltha/playground/voltha-tt-physical-functional-tests.groovy
index 4410f50..9a3c84e 100644
--- a/jjb/pipeline/voltha/playground/voltha-tt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/playground/voltha-tt-physical-functional-tests.groovy
@@ -75,7 +75,7 @@
{
steps
{
- iam(this)
+ iam
{
enter = true
label = getIam()
@@ -111,7 +111,7 @@
""")
} // step
- iam(this)
+ iam
{
leave = true
label = getIam()
diff --git a/vars/iam.groovy b/vars/iam.groovy
index cafd8f2..845bdd0 100644
--- a/vars/iam.groovy
+++ b/vars/iam.groovy
@@ -112,14 +112,14 @@
// -----------------------------------------------------------------------
Boolean call\
(
- def body, // jenkins closure attached to the call iam() {closure}
- def self, // jenkins env object for access to primitives like echo()
+ Closure body, // jenkins closure attached to the call iam() {closure}
+ // def self, // jenkins env object for access to primitives like echo()
)
{
// evaluate the body block and collect configuration into the object
Map argv = [:] // {ternary,elvis} operator
body.resolveStrategy = Closure.DELEGATE_FIRST
- body.delegate = config
+ body.delegate = argv
body()
String iam = getIam(argv, 'main')