Merge "Add triggers for container registry"
diff --git a/src/com/mirantis/mk/KaasUtils.groovy b/src/com/mirantis/mk/KaasUtils.groovy
index 5c74cca..7185d78 100644
--- a/src/com/mirantis/mk/KaasUtils.groovy
+++ b/src/com/mirantis/mk/KaasUtils.groovy
@@ -1,5 +1,7 @@
 package com.mirantis.mk
 
+import static groovy.json.JsonOutput.toJson
+
 /**
  *
  * KaaS Component Testing Utilities
@@ -993,3 +995,44 @@
     }
     return jobParams
 }
+
+/** Getting test scheme from text, which should be
+Imput example:
+text="""
+ DATA
+
+ kaas_bm_test_schemas:
+  KAAS_RELEASES_REFSPEC: ''
+  KEY: VAL
+
+ DATA
+ """
+
+ Call: parseTextForTestSchemas(['text' : text,'keyLine' : 'kaas_bm_test_schemas'])
+
+ Return:
+ ['KAAS_RELEASES_REFSPEC': '', 'KEY' : 'VAL']
+ **/
+def parseTextForTestSchemas(Map opts) {
+    String text = opts.getOrDefault('text', '')
+    String keyLine = opts.getOrDefault('keyLine', '')
+    Map testScheme = [:]
+    if (!text || !keyLine) {
+        return testScheme
+    }
+    if (text =~ /\n$keyLine\n.*/) {
+        def common = new com.mirantis.mk.Common()
+        try {
+            String regExp = '\\n' + keyLine + '\\n'
+            // regexep  block must be followed by empty line
+            testScheme = readYaml text: "${text.split(regExp)[1].split('\n\n')[0]}"
+            common.infoMsg("parseTextForTestSchemas result:\n" + testScheme)
+            common.mergeEnv(env, toJson(testScheme))
+        }
+        catch (Exception e) {
+            common.errorMsg("There is an error occured during parseTextForTestSchemas execution:\n${e}")
+            throw e
+        }
+    }
+    return testScheme
+}
\ No newline at end of file
diff --git a/src/com/mirantis/mk/Workflow.groovy b/src/com/mirantis/mk/Workflow.groovy
index 03a43a6..44203ab 100644
--- a/src/com/mirantis/mk/Workflow.groovy
+++ b/src/com/mirantis/mk/Workflow.groovy
@@ -319,10 +319,12 @@
             try {
                 if (wfPauseStepSlackReportChannel) {
                     def slack = new com.mirantis.mcp.SlackNotification()
-                    slack.jobResultNotification('wf_pause_step_before_run',
-                      wfPauseStepSlackReportChannel,
-                      env.JOB_NAME, null,
-                      env.BUILD_URL, 'slack_webhook_url')
+                    wfPauseStepSlackReportChannel.split(',').each {
+                        slack.jobResultNotification('wf_pause_step_before_run',
+                                                    it.toString(),
+                                                    env.JOB_NAME, null,
+                                                    env.BUILD_URL, 'slack_webhook_url')
+                    }
                 }
                 timeout(time: wfPauseStepTimeout, unit: 'MINUTES') {
                     input("Workflow pause requested before run: ${jobName}/${jobDescription}\n" +