Add input parameters test function
Change-Id: Ide72301be4e1295dad1e2df9b89f99bfaa20f92f
diff --git a/src/com/mirantis/mk/Common.groovy b/src/com/mirantis/mk/Common.groovy
index daf9f38..e71a551 100644
--- a/src/com/mirantis/mk/Common.groovy
+++ b/src/com/mirantis/mk/Common.groovy
@@ -404,3 +404,11 @@
m.putAll(lazyMap)
return m
}
+
+/**
+ * Test pipeline input parameter existence and validity (not null and not empty string)
+ * @param paramName input parameter name (usually uppercase)
+ */
+def validInputParam(paramName){
+ return env.getEnvironment().containsKey(paramName) && env[paramName] != null && env[paramName] != ""
+}
\ No newline at end of file