diff --git a/src/com/mirantis/mk/JenkinsUtils.groovy b/src/com/mirantis/mk/JenkinsUtils.groovy
index 4513f2d..780ccab 100644
--- a/src/com/mirantis/mk/JenkinsUtils.groovy
+++ b/src/com/mirantis/mk/JenkinsUtils.groovy
@@ -231,3 +231,43 @@
   }
   return buildsMap
 }
+
+/**
+ * Check dependency jobs passed successfully
+
+ * @param block   (bool) Block child jobs in case of parent dependencies failed
+ * @return        (map)[
+ *                    status: (bool) True if there are no failed dependencies
+ *                    log: (string) Verbose description
+ *                   ]
+ */
+def checkDependencyJobs(block = true) {
+    def common = new com.mirantis.mk.Common()
+    depList = []
+    if (env.TRIGGER_DEPENDENCY_KEYS){
+        common.infoMsg('Job may depends on parent jobs, check if dependency jobs exist...')
+        depKeys = env.TRIGGER_DEPENDENCY_KEYS.toString()
+        depList = depKeys.split()
+        if (depList){
+            common.infoMsg('Here is dependency jobs-list: ' + depList)
+            for (String item : depList) {
+                prjName = item.replaceAll('[^a-zA-Z0-9]+', '_')
+                triggerResult = 'TRIGGER_' + prjName.toUpperCase() + '_BUILD_RESULT'
+                triggerJobName = 'TRIGGER_' + prjName.toUpperCase() + '_BUILD_NAME'
+                triggerJobBuild = 'TRIGGER_' + prjName.toUpperCase() + '_BUILD_NUMBER'
+                if (env.getProperty(triggerResult) != 'SUCCESS'){
+                    msg = "Dependency job ${env.getProperty(triggerJobName)} #${env.getProperty(triggerJobBuild)} is ${env.getProperty(triggerResult)}"
+                    common.warningMsg(msg)
+                    if (block){
+                        currentBuild.result = 'NOT_BUILT'
+                        currentBuild.description = msg
+                    }
+                    return [status: false, log: msg, jobs: depList]
+                }
+            }
+        }
+    } else {
+        common.infoMsg('There is no job-dependencies')
+    }
+    return [status: true, log: '', jobs: depList]
+}
