From 05a90955b60b3bf2638c15f242c9a81175cccda7 Mon Sep 17 00:00:00 2001 From: Mike Bonnet Date: Feb 21 2019 15:33:45 +0000 Subject: [PATCH 1/2] add wait() helper function --- diff --git a/vars/c3i.groovy b/vars/c3i.groovy index d102d25..5e10fb2 100644 --- a/vars/c3i.groovy +++ b/vars/c3i.groovy @@ -13,3 +13,8 @@ def build(modelsOrName, boolean wait = true, Object... args) { def buildname = builder.build(modelsOrName, wait, args) return buildname } + +def wait(buildsel) { + def builder = new com.redhat.c3i.util.Builder() + return builder.wait(buildsel) +} From 6047f4efa3cd99e2e41d7be4cfc7a71ab7fad5e0 Mon Sep 17 00:00:00 2001 From: Mike Bonnet Date: Feb 21 2019 15:34:29 +0000 Subject: [PATCH 2/2] groovy doesn't support overloading the same method with different numbers of args --- diff --git a/vars/c3i.groovy b/vars/c3i.groovy index 5e10fb2..6fbbd4c 100644 --- a/vars/c3i.groovy +++ b/vars/c3i.groovy @@ -8,9 +8,15 @@ def cleanup(String... apps) { } } -def build(modelsOrName, boolean wait = true, Object... args) { +def build(modelsOrName, Object... args) { def builder = new com.redhat.c3i.util.Builder() - def buildname = builder.build(modelsOrName, wait, args) + def buildname = builder.build(modelsOrName, false, args) + return buildname +} + +def buildAndWait(modelsOrName, Object... args) { + def builder = new com.redhat.c3i.util.Builder() + def buildname = builder.build(modelsOrName, true, args) return buildname }