Add a Pipeline Notification Strategy

Updated 1 month ago by Michael Cretzman

You can send Pipeline event notifications using email and popular communication and incident management platforms.

Event notifications are set up using Notification Rules in your Pipeline. You select the types of events to send, and then select how you want to send notifications. When those events occur, Harness sends event information to those channels and recipients.

This topic describes how to set up Notification Rules in your Pipeline.

You can set notifications preferences on User Groups also. See Add and Manage User Groups.

In this topic:

Before You Begin

Limitations

Currently, Harness supports several communication and incident management platforms. If you don't see yours, contact Harness.

Review: Requirements

To create or enable a Notification Rule, a User must belong to a User Group with a Role that has the Pipeline Create/Edit permission.

Step 1: Add a Notification Rule

In your Pipeline, click Notification Rules.

To create a new notification rule, click Notifications. The Notification Rule settings appear.

Enter a name for the notification rule. You might want to edit the name after you've selected the events that trigger the rule.

Click Next.

Step 2: Select Events

In Pipeline Events, select the events that will trigger the notification.

You can select events for the Pipeline or stages.

If you select the stage events, you can select which stages to use.

Click Continue.

There are different communication and incident management platforms to use for the notification rule. Their settings are described below.

The events are self-explanatory, but there are a few considerations:

  • If you select both Pipeline End and Pipeline Success, you'll get two notifications.
  • Pipeline Pause only applies to a manual pause of the Pipeline execution. Pending Approval steps don't trigger the Pipeline Pause event.

Option: Email Notifications

For email notifications, simply type in the email addresses that you want to notify.

Enter multiple addresses as a comma-separated list. For example, john.doe@example.io,qateam@example.io.

Here's an example of an email notification for the Pipeline Start event:

Along with the start date and who triggered the Pipeline, the email includes a link to the Pipeline execution in Harness.

Option: Slack Notifications

For Slack notifications, you simply create a webhook in Slack and paste it into the Slack Webhook URL setting in the Notification Rule.

Follow the steps in Slack documentation for creating a Slack app, selecting your channel, and creating a webhook:  Sending messages using Incoming Webhooks.

When you are done, you'll have a webhook that looks something like this:

Copy the webhook.

Paste the Webhook into Slack Webhook URL.

Option: PagerDuty Notifications

For PagerDuty notifications, enter the key for a PagerDuty Account/Service to which Harness can send notifications.

You can copy/paste this key from PagerDuty's Configuration > Services > Service Details dialog > Integrations tab, as shown below.

For details, see PagerDuty's documentation on Creating Integrations.

Option: Notify Slack Channels in User Groups

If you have Harness User Groups that have Slack webhooks set up in their Notification Preferences, you can select those groups and Harness will notify them in addition to the Email, Slack, or PagerDuty settings.

See Send Notifications Using Slack.

Step 3: Enable or Disable Notification Rules

Once you've created Notification Rules, you can enable and disable them in the Notifications page.

See Also


Please Provide Feedback