diff --git a/jobs/pipelines/deploy-cicd-and-run-tests.groovy b/jobs/pipelines/deploy-cicd-and-run-tests.groovy
index 7566b34..27dbfd7 100644
--- a/jobs/pipelines/deploy-cicd-and-run-tests.groovy
+++ b/jobs/pipelines/deploy-cicd-and-run-tests.groovy
@@ -6,8 +6,8 @@
 
 currentBuild.description = "${NODE_NAME}:${ENV_NAME}"
 
-throttle(['fuel_devops_environment']) {
-  node ("${NODE_NAME}") {
+def deploy(shared, common, steps) {
+    def report_text = ''
     try {
 
         stage("Clean the environment and clone tcp-qa") {
@@ -29,20 +29,14 @@
             shared.swarm_deploy_platform(env.PLATFORM_STACK_INSTALL)
         }
 
-        stage("Run tests") {
-            shared.swarm_run_pytest(steps)
-        }
+        currentBuild.result = 'SUCCESS'
 
     } catch (e) {
-        common.printMsg("Job failed", "red")
+        common.printMsg("Deploy is failed: " + e.message , "red")
         shared.run_cmd("""\
             dos.py suspend ${ENV_NAME} || true
-            dos.py snapshot ${ENV_NAME} test_failed || true
+            dos.py snapshot ${ENV_NAME} deploy_failed || true
         """)
-        throw e
-    } finally {
-        // TODO(ddmitriev): analyze the "def currentResult = currentBuild.result ?: 'SUCCESS'"
-        // and report appropriate data to TestRail
         if ("${env.SHUTDOWN_ENV_ON_TEARDOWN}" == "false") {
             shared.run_cmd("""\
                 dos.py resume ${ENV_NAME} || true
@@ -54,8 +48,52 @@
                 dos.py destroy ${ENV_NAME} || true
             """)
         }
-        shared.report_deploy_result(steps)
-        shared.report_test_result()
+        report_text = e.message
+        throw e
+    } finally {
+        shared.create_deploy_result_report(steps, currentBuild.result, report_text)
+    }
+}
+
+def test(shared, common, steps) {
+    try {
+        stage("Run tests") {
+            shared.swarm_run_pytest(steps)
+        }
+
+    } catch (e) {
+        common.printMsg("Tests are failed: " + e.message, "red")
+        shared.run_cmd("""\
+            dos.py suspend ${ENV_NAME} || true
+            dos.py snapshot ${ENV_NAME} tests_failed || true
+        """)
+        throw e
+    } finally {
+        if ("${env.SHUTDOWN_ENV_ON_TEARDOWN}" == "false") {
+            shared.run_cmd("""\
+                dos.py resume ${ENV_NAME} || true
+                sleep 20    # Wait for I/O on the host calms down
+                dos.py time-sync ${ENV_NAME} || true
+            """)
+        } else {
+            shared.run_cmd("""\
+                dos.py destroy ${ENV_NAME} || true
+            """)
+        }
+    }
+}
+
+// main
+throttle(['fuel_devops_environment']) {
+  node ("${NODE_NAME}") {
+    try {
+        deploy(shared, common, steps)
+        test(shared, common, steps)
+    } catch (e) {
+        common.printMsg("Job is failed: " + e.message, "red")
+        throw e
+    } finally {
+        shared.swarm_testrail_report(steps)
     }
   }
 }
\ No newline at end of file
