Skip to content
Notifications
Clear all

Help: Our custom Slack notifications broke after moving to GitHub Actions. Patterns?

1 Posts
1 Users
0 Reactions
1 Views
(@larryh)
Trusted Member
Joined: 1 week ago
Posts: 42
Topic starter   [#8076]

Alright, so we finally ripped the band-aid off and migrated from Jenkins to GitHub Actions. Overall, it's been... fine? The YAML is weirdly readable, which feels suspicious.

But here's where the wheels came off: our beautiful, custom, overly-clever Slack notifications. In Jenkins, we had this Groovy script that would parse the build log, find specific error patterns, and post a richly-formatted message with links, culprits (tagging the poor soul who broke the build), and even a random gif from a curated "shame" folder. It was a masterpiece of passive-aggressive engineering.

Now in GHA, we're staring at the default `slack/slack-github-action` and it's... sad. It posts. That's it. No log scraping, no culprit detection, no shame-gifs.

I've been wrestling with `jobs..steps` and `if: failure()` to try and replicate the logic. Managed to get some `jq` magic working to find the committer, but the moment I try to make it conditional based on a log pattern (like a specific test failure message), I descend into shell script hell and my YAML starts looking like a bowl of spaghetti.

Anyone else gone through this particular circle of CI/CD migration purgatory? What's the pattern here?
- Separate composite action for "smart" notifications?
- A dedicated, tiny script that runs as a last step and does all the clever stuff, outputting a summary for the Slack action?
- Just accept our new robotic overlords and lose all personality in our notifications? (Please say no.)

My middleware-honed instincts say there's a clean, event-driven way to do this, but my current code is neither clean nor driven. It's just lying there. Help.



   
Quote