SlackOps Interactive Notification


Approving or rejecting Manual Judgement constraints from Slack.
The user can set up SlackOps Interactive notifications in your delivery config, which will enable interactive notifications to a Slack channel of your choice, where you can simply click a button to approve or reject the deployment of the artifact into the environment.

Create Slack App

There are two ways to create a Slack app as mentioned below. Users can choose any one of the methods to create an application.

Creating Slack App From Scratch

Go to this URL and proceed with the below steps.
  1. 1.
    Click “Create an App” to
2. Click on “From scratch” in the pop up window as shown below:
3. Type your “App Name” and “Pick a workspace to develop your app in” from the dropdown and then click “Create App”.
4. Click on “Interactive Components” to Configure Spinnaker gate Callback API Endpoint in Slack.
5. “Turn on” interactivity and enter the Spinnaker gate url in the Request URL column and then click “Save Changes”. For Example: (https://<your-domain-name>/notifications/callbacks/slack).
6. Click “OAuth & Permissions” from the navigation menu and scroll down to find the "Scopes" and then click “Add an Oauth Scope”.
7. For bot token select “users:read,, chat:write” from the drop down.
Your application is now ready to be installed in the workspace and added to Slack channels.

Creating Slack App From an app manifest

Go to this URL and proceed with the below steps.
  1. 1.
    Click “Create an App”
2. Click on “From an app manifest” in the pop up window as shown below:
3. Select a workspace and click “Next”.
4. “Enter app manifest” window will appear as shown below:
5. Update the App Name, display name for your slack app and the following manifest data in the “Enter app manifest” window as shown in the above image and click “Next”.
name: <your app name>
display_name: <your app display name>
always_online: false
- users:read
- chat:write
is_enabled: true
request_url: https://<spinnaker gate host>/notifications/callbacks/slack
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: false
6. Review the summary and click “Create”
Your application is now ready to be installed in the workspace and added to Slack channels.

Install Slack App

Follow the steps below to install the Slack application into your Slack workspace and add it to your Slack channels.
Go to this URL and proceed with the below steps.
  1. 1.
    Click your application from the list as shown in the below image.
2. Below screen will appear and you can select your application from the drop down in the top left hand side corner. Click “Basic Information” and click “Install your app” and then click “Install to Workspace“ to install your application into the workspace.
3. Select your “Slack Channel” from the drop down and Click “Allow”.
Your application is installed now in the workspace and you need to integrate your application into Slack channels by following the below steps.

Integration to Slack Channel

  1. 1.
    Go to your Slack application and Click your “Channel Name” from the channel list as shown in the below image. For Example: "#demo_alerts" channel name selected in below steps.
2. Click on channel name “# demo_alerts” to integrate your application as below:
3. After clicking the channel name below screen will appear and click “Integrations” tab.
4. Click “Add an App” button from the integration window.
5. Search “SlackOps” from the App Directory and click “Add” as shown in the below image.
6. Now your application is Integrated with Slack Channel as shown in the below image and you will get notification in the selected channels.

Configure Spinnaker

Application Credentials required for spinnaker echo local configuration. These credentials will be generated automatically when your application is created, and you can find them in your application's Basic Information.
  1. 1.
    Click On “Basic Information” for your app and scroll down to see the “App Credentials
Note: Make sure that you have selected the correct application name from the top left hand side as shown in the above image.
2. The App Credentials window displays all the required credentials as shown below.
Note: These credentials allow your app to access the Slack API. They are secret. Please don't share your app credentials with anyone, include them in public code repositories, or store them in insecure ways.
3. Click “OAuth & Permissions” copy bot token from “Bot User OAuth Token” box. (Note: Bot token will get generated when you install your app in the slack workspace).
4. Update the /home/spinnaker/.hal/config file with following details. You can see the token details from the above image and paste it here.
enabled: true
token: "xoxb-****************-****************"
botName: "<your app name>"
5. Update the /home/spinnaker/.hal/default/profiles/echo-local.yml file with following details. Update your “Token and Signing_secret” details from the “Bot User OAuth Token & App Credentials” as explained in the steps 2 & 3.
token: "xoxb-**********-***********-*******************"
signing_secret: "********************"
hal deploy apply
6. Click on your application from the application dashboard and click "Pipeline Builder" and click “Configure a new pipeline” as shown in the image below.
To create a new application, refer here.
7. Provide your “Pipeline Name” and click “Create”.
To know more about the pipeline, refer here.
8. Click “Add Stage” and select type as “Manual Judgement” from the drop down.
9. Select “Send Notifications” check box and click “Add Notification Preference” in your pipeline manual judgement stage.
10. Select Notify via as “Slack” from drop down and provide your Slack Channel name. The application must be integrated with Slack, and notifications will be sent to that channel.
11. Select the options when the notification should execute and click Update as below shown in the above image.
12. When a user triggers a pipeline, they will receive a Slack notification asking them to approve or reject a particular stage, as shown below:
The pipeline will proceed to the next stage or be rejected in a specific stage based on the response as "Approve/Reject."