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.
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
- Open a pipeline.
- 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. - Click the Notifications tab.
- Click Add, select the type of notification, and configure the notification details.
- To create a Slack notification when a pipeline succeeds, create a webhook notification.
- Select Webhook.
- To configure the Slack notification, enter the information.
- Click Save.
- 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
- To create a Jira ticket, configure the ticket information.
- Select Ticket.
- To configure the Jira notification, enter the information.
- Click Save.
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.