Merge "Fixed backward compatibility lab pipeline code"
diff --git a/lab-pipeline.groovy b/lab-pipeline.groovy
index ff72b5d..1158a74 100644
--- a/lab-pipeline.groovy
+++ b/lab-pipeline.groovy
@@ -53,16 +53,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
@@ -70,6 +61,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