Fixed backward compatibility lab pipeline code
Change-Id: I7b09e9abc219d369ab2e6bfb8a217e0e5646efe3
diff --git a/lab-pipeline.groovy b/lab-pipeline.groovy
index 2db1608..7ddfbe8 100644
--- a/lab-pipeline.groovy
+++ b/lab-pipeline.groovy
@@ -51,16 +51,7 @@
salt = new com.mirantis.mk.Salt()
test = new com.mirantis.mk.Test()
-// try to get STACK_INSTALL or fallback to INSTALL if exists
-try {
- def temporary = STACK_INSTALL
-} catch (MissingPropertyException e) {
- try {
- STACK_INSTALL = INSTALL
- } catch (MissingPropertyException e2) {
- common.errorMsg("Property STACK_INSTALL or INSTALL not found!")
- }
-}
+
_MAX_PERMITTED_STACKS = 2
@@ -68,6 +59,17 @@
timestamps {
node {
+ // try to get STACK_INSTALL or fallback to INSTALL if exists
+ try {
+ def temporary = STACK_INSTALL
+ } catch (MissingPropertyException e) {
+ try {
+ STACK_INSTALL = INSTALL
+ env['STACK_INSTALL'] = INSTALL
+ } catch (MissingPropertyException e2) {
+ common.errorMsg("Property STACK_INSTALL or INSTALL not found!")
+ }
+ }
try {
//
// Prepare machines