Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial will walk you through how to create and configure the Slack tool for Slack notifications.

The below mentioned steps will guide the step by step workflow:

  1. On Tool Registry > Click on New Tool and enter the details to create new Slack Tool

Image RemovedImage Added

2. Once Tool is created, click on Connections tab

Image RemovedImage Added

3. Click on ‘Add to Slack’ button and enter Slack credentials → which will add the Opsera app to respective Slack

Image RemovedImage Added

With the above steps, Opsera app has been added to the Slack.

The below steps will guide on getting one way slack notification to a slack channel.

4. On Pipeline, on any step - Click on the Notification icon

Image RemovedImage Added

5. Enable Slack Notifications and select Notification Level - ‘Step Completed’ or ‘On error’ or ‘All Activity’

Image RemovedImage Added

6. Select Slack Tool [Created from Tool Registry] and Enter Channel - where the notifications will be sent

Image RemovedImage Added

7. Click on Save button, so that the notification settings will be saved

Image RemovedImage Added

8. Now, Trigger the pipeline → Based upon the notification level set, notifications will be sent to respective slack channel.

Image RemovedImage RemovedImage AddedImage Added

With the above steps - one way slack notifications can be configured and notifications can be received.

The below steps will guide you on two way slack notification with ‘Approve’ or ‘Deny’ flow

9. On the Pipeline steps - Add ‘Approval Gate’ step where approval is needed to move to other pipeline steps

Image RemovedImage Added

10. After Approval Gate step is saved - click on Notification icon and enter the Slack Notification details and Click Save

Image RemovedImage Added

11. Now, run the pipeline and when it reaches ‘Approval Gate’ step → Step status will be changed and will wait for approval from Slack Channel.

Image RemovedImage Added

12. An Approval notification will be sent on the respective slack channel

Image RemovedImage Added

13. Click on ‘Approve’ button on the slack notification → Approved message will be updated on the same Slack Notification

Image RemovedImage Added

14. Once Approved, Pipeline execution resumes and moves to further pipeline steps for execution.

Image RemovedImage RemovedImage AddedImage Added

In the same way, if ‘Deny’ button clicked on Slack notification, pipeline execution will be stopped.

With the above workflow steps, Slack Approve/Deny can be configured and pipeline approval/notification can be controlled.