Send a notification to the Slack channel when a deployment to production fails using Jira automation.

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

This automation rule is designed to notify the team via Slack whenever a deployment to the production environment fails. The rule triggers on a failed deployment and sends a detailed message to a specified Slack channel.

Environment

Jira cloud

Solution

Automation Rule Setup:

Trigger:

  • Event: Deployment failed

Action:

  • Send Slack message

Details:

  • Webhook URL (required): Make sure to use the correct Webhook URL for the Slack channel where you want the message to be posted.

  • Message Content:

1 2 3 4 <{{deployment.url}}|Deployment {{deployment.name}}> *failed* to deploy to `{{deployment.environment}}` • Issue: <{{issue.url}}|{{issue.key}}> {{#if(exists(issue.assignee.displayName))}}• Issue assignee: `{{issue.assignee.displayName}}`{{/}} • Environment type: `{{deployment.environment.type}}`
  • Send Message as Automation User: Ensure this option is checked.

Message Breakdown:

  • Deployment URL and Name: A link to the failed deployment, with the deployment name.

  • Issue URL and Key: A link to the related Jira issue, with the issue key.

  • Issue Assignee (Optional): Displays the assignee’s name if one exists.

  • Environment Type: Specifies the type of environment where the failure occurred (e.g., Production).

This setup ensures that your team is immediately informed of any deployment failures to production, allowing for quick investigation and resolution.

Updated on March 10, 2025

Still need help?

The Atlassian Community is here for you.