diff --git a/test-run-tempest.groovy b/test-run-tempest.groovy
index 1f8a09b..6edb276 100644
--- a/test-run-tempest.groovy
+++ b/test-run-tempest.groovy
@@ -22,36 +22,37 @@
 def python = new com.mirantis.mk.Python()
 
 def pepperEnv = "pepperEnv"
+timeout(time: 12, unit: 'HOURS') {
+    node("python") {
+        try {
 
-node("python") {
-    try {
+            stage('Setup virtualenv for Pepper') {
+                python.setupPepperVirtualenv(pepperEnv, SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
+            }
 
-        stage('Setup virtualenv for Pepper') {
-            python.setupPepperVirtualenv(pepperEnv, SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
-        }
+            //
+            // Test
+            //
 
-        //
-        // Test
-        //
-
-        stage('Run OpenStack Tempest tests') {
-            test.runTempestTests(pepperEnv, IMAGE_LINK, TEST_TARGET, TEST_TEMPEST_PATTERN, "/home/rally/rally_reports/",
-                    "/home/rally/keystonercv3", SET, CONCURRENCY, "mcp.conf", "mcp_skip.list", "/root/keystonercv3",
-                    "/root/rally_reports", DO_CLEANUP_RESOURCES)
-        }
-        stage('Copy test reports') {
-            test.copyTempestResults(pepperEnv, TEST_TARGET)
-        }
-        stage('Archiving test artifacts') {
-            test.archiveRallyArtifacts(pepperEnv, TEST_TARGET)
-        }
-    } catch (Throwable e) {
-        currentBuild.result = 'FAILURE'
-        throw e
-    } finally {
-        if (CLEANUP_REPORTS.toBoolean()) {
-            stage('Cleanup reports') {
-                test.removeReports(pepperEnv, TEST_TARGET, "rally_reports", 'rally_reports.tar')
+            stage('Run OpenStack Tempest tests') {
+                test.runTempestTests(pepperEnv, IMAGE_LINK, TEST_TARGET, TEST_TEMPEST_PATTERN, "/home/rally/rally_reports/",
+                        "/home/rally/keystonercv3", SET, CONCURRENCY, "mcp.conf", "mcp_skip.list", "/root/keystonercv3",
+                        "/root/rally_reports", DO_CLEANUP_RESOURCES)
+            }
+            stage('Copy test reports') {
+                test.copyTempestResults(pepperEnv, TEST_TARGET)
+            }
+            stage('Archiving test artifacts') {
+                test.archiveRallyArtifacts(pepperEnv, TEST_TARGET)
+            }
+        } catch (Throwable e) {
+            currentBuild.result = 'FAILURE'
+            throw e
+        } finally {
+            if (CLEANUP_REPORTS.toBoolean()) {
+                stage('Cleanup reports') {
+                    test.removeReports(pepperEnv, TEST_TARGET, "rally_reports", 'rally_reports.tar')
+                }
             }
         }
     }
