Oracle by Example brandingIntegrating Slack with Oracle Developer Cloud Service

section 0Before You Begin

This 15-minute tutorial shows you how to integrate Oracle Developer Cloud Service with a Slack channel.

Background

Slack is a Cloud based team collaboration software. For more information about Slack, see https://slack.com/.

In this tutorial, you create a Slack webhook in the Oracle Developer Cloud Service project and configure it to send notifications about events and activities of the project. Note that only project Owners can create a webhook.

What Do You Need?

  • A web browser
  • Your Oracle Cloud account credentials
  • An Oracle Cloud account with active Oracle Developer Cloud Service
  • An Oracle Developer Cloud Service project with the project Owner role
    This tutorial assumes that you are using a Demo project.
  • An active Slack workspace
    This tutorial assumes that you have created a Demo workspace in Slack and want to receive notifications in the default general channel. To create a workspace in Slack, see the Slack documentation.
    Demo workspace in Slack
    Description of the illustration slack_general.png

section 1Configuring the Slack Channel to Receive Notifications

In this section, you install the Incoming Webhook app in Slack and configure the general channel to receive notifications. If you have already installed the app, you can ignore this section.

  1. Open the Slack workspace in a web browser.
    Demo workspace in Slack
    Description of the illustration slack_general.png
  2. In the left navigation bar, click Apps.
    Apps option in left navigation bar
    Description of the illustration slack_navbar_apps.png
  3. In the Browse Apps page, in the search box, enter incoming webhook. In the From the App Directory list, select Incoming Webhooks.
    Browse Apps page
    Description of the illustration slack_browse_apps.png
  4. In the Incoming WebHooks page, click Add Configuration.
    Incoming Webhooks page
    Description of the illustration slack_incoming_webhooks.png
  5. In the Post to Channel list, select #general, and click Add Incoming Webhooks Integration.
    Incoming Webhooks Integration button
    Description of the illustration slack_add_incoming_webhook.png
  6. In the Setup Instructions section, select the value of the Webhook URL field and copy it to the clipboard.
    webhook URL
    Description of the illustration slack_webhook_url.png

section 2Configuring the Oracle Developer Cloud Service Project to Send Notifications

In this section, you configure the Slack webhook of Oracle Developer Cloud Service to send event notifications to the Slack channel.

  1. In Oracle Developer Cloud Service web user interface, open the project.
  2. In the left navigation bar, click Administration > Webhooks.
    Project navigation bar
    Description of the illustration devcs_navbar.png
  3. In the Webhooks page, click + New Webhook.
  4. In the Create Webhook page, select or enter the following details:
    • Type: Slack
    • Name: devcs_slack_demo_webhook
    • URL: Webhook URL of the general Slack channel
      Remember you copied the URL in the clipboard. See Step 6 of the above section.
    • Subscribe: All events

    Leave other fields with default values.

    Create Webhook page
    Description of the illustration devcs_create_webhook.png
  5. Click Done.
  6. In the Webhooks page, click the Test button.
    Slack webhook
    Description of the illustration devcs_webhook.png
  7. Open the Slack channel page to view the test notification sent from the Oracle Developer Cloud Service project.
    Slack webhook
    Description of the illustration slack_test_devcs_event.png
  8. Trigger more events, such as run a build or update an issue in the Oracle Developer Cloud Service project to view their notifications in the Slack channel.
    Slack webhook
    Description of the illustration slack_more_devcs_events.png

more informationWant to Learn More?