-
Notifications
You must be signed in to change notification settings - Fork 27
Sends Slack alerts when errors occur in CircleCI jobs. #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you're not passing along the actual message describing what failed and instead using global fails. Did you try doing it the same way that it's currently working (i.e., each step has it's own fail handler and a message describing how it's failing)?
That seems like a better approach if it works via slack.
.circleci/config.yml
Outdated
| exit 1 | ||
| name: Send alerts to slack when something fails | ||
| when: on_fail | ||
| #Clone the repo to be sure that script circleci_pipeline_metadata.sh is always available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean up debug code.
|
@fireboy1919 and @Goncalo-Almeida all changes were applied and tested. Please can you review. |
f193088 to
5324bcd
Compare
|
Just in case @Goncalo-Almeida @fireboy1919 please don't merge, first we need to configure Circle-CI Env. variable. |
Sends Slack alerts when errors occur in CircleCI jobs.
Description
Ensure teams are notified in real time about failures in CircleCI pipelines. This reduces response time, helps identify issues quickly, and improves pipeline reliability.
Adds Slack alert integration that posts error notifications from CircleCI pipelines directly to configured Slack channels.
How was it tested? What documentation was provided?
Verified by running failing jobs in CircleCI and confirming that Slack alerts were triggered with the correct error details in the target channel. Successful runs were also checked to ensure no false alerts.
Documentation: A minimal README with environment variable setup (CIRCLE_TOKEN, SLACK_ACCESS_TOKEN, SLACK_DEFAULT_CHANNEL) and instructions for enabling the Slack integration in
Types of changes