Notifications are ways to communicate with your teams and let them know the status of your pipelines in Code Stream.

To send notifications when a pipeline runs, you can configure Code Stream notifications based on the status of the entire pipeline, stage, or task.

  • An email notification sends an email on:
    • Pipeline completion, waiting, failure, cancelation, or start.
    • Stage completion, failure, or start.
    • Task completion, waiting, failure, or start.
  • A ticket notification creates a ticket and assigns it to a team member on:
    • Pipeline failure or completion.
    • Stage failure.
    • Task failure.
  • A webhook notification sends a request to another application on:
    • Pipeline failure, completion, waiting, cancelation, or start.
    • Stage failure, completion, or start.
    • Task failure, completion, waiting, or start.
For example, you can configure an email notification on a user operation task to obtain approval at a specific point in your pipeline. When the pipeline runs, this task sends email to the person who must approve the task. If the User Operation task has an expiration timeout set in days, hours, or minutes, the required user must approve the pipeline before the task expires. Otherwise, the pipeline fails as expected.

To create a Jira ticket when a pipeline task fails, you can configure a notification. Or, to send a request to a Slack channel about the status of a pipeline based on the pipeline event, you can configure a webhook notification.

You can use variables in all types of notifications. For example, you can use ${var} in the URL of a Webhook notification.

Prerequisites

  • Verify that one or more pipelines are created. See the use cases in Tutorials for using Code Stream.
  • To send email notifications, confirm that you can access a working email server. For help, see your administrator.
  • To create tickets, such as a Jira ticket, confirm that the endpoint exists. See What are Endpoints in Code Stream.
  • To send a notification based on an integration, you create a webhook notification. Then, you confirm that the webhook is added and working. You can use notifications with applications such as Slack, GitHub, or GitLab.

Procedure

  1. Open a pipeline.
  2. To create a notification for the overall pipeline status, or the status of a stage or task:
    To create a notification for: What you do:
    Pipeline status Click a blank area on the pipeline canvas.
    Status of a stage Click a blank area in a stage of the pipeline.
    Status of a task Click a task in a stage of the pipeline.
  3. Click the Notifications tab.
  4. Click Add, select the type of notification, and configure the notification details.
  5. To create a Slack notification when a pipeline succeeds, create a webhook notification.
    1. Select Webhook.
    2. To configure the Slack notification, enter the information.
    3. Click Save.
    4. When the pipeline runs, the Slack channel receives the notification of the pipeline status. For example, users might see the following on the Slack channel:
      Codestream APP [12:01 AM]
      Tested by User1 - Staging Pipeline 'User1-Pipeline', Pipeline ID 'e9b5884d809ce2755728177f70f8a' succeeded
  6. To create a Jira ticket, configure the ticket information.
    1. Select Ticket.
    2. To configure the Jira notification, enter the information.
    3. Click Save.
      When you configure Jira ticket notifications for pipeline failures, you include the Jira project, type of issue, assignee, and summary.

Results

Congratulations! You learned that you can create various types of notifications in several areas of your pipeline in Code Stream.

What to do next

For a detailed example of how to create a notification, see How do I create a Jira ticket in Code Stream when a pipeline task fails.