[feat][workflow] scenario resulst slack reporting
Change-Id: I79205779a0c8fde60e538ae45d8551c20a77bd44
us: https://mirantis.jira.com/browse/PRODX-3286
diff --git a/src/com/mirantis/mk/Workflow.groovy b/src/com/mirantis/mk/Workflow.groovy
index 681d204..0a3aff0 100644
--- a/src/com/mirantis/mk/Workflow.groovy
+++ b/src/com/mirantis/mk/Workflow.groovy
@@ -209,7 +209,7 @@
*
*/
-def runScenario(scenario) {
+def runScenario(scenario, slackReportChannel = '') {
// Clear description before adding new messages
currentBuild.description = ''
@@ -248,5 +248,10 @@
}
println "Failed jobs: ${failed_jobs}"
}
+
+ if (slackReportChannel) {
+ def slack = new com.mirantis.mcp.SlackNotification()
+ slack.jobResultNotification(currentBuild.result, slackReportChannel, '', null, '', 'slack_webhook_url')
+ }
} // finally
}