Slack notifications on failed builds for specific branches



I’ve got the slack notifications working via the Project Settings and the failed builds flag works fine but I don’t really care if builds fail on the majority of branches because we have build status hooked up to pull requests I only care if the build is broken on master, stage or prod branches (ie. we need to get that fixed immediately!). Is there a way to only have it notify on those branches?


This is where we stand on notifications on 2.0:


So does that still run the build? Doesn’t say anything specifically about notifications?


You’re right- I definitely messed up. Sorry about that! :frowning:

The 1.0 syntax is currently supported in the 2.0 so this works as expected;

      - url:
        - /.*/

Sorry again for my mistake.


Cool thanks for that, is there a way to signal only to notify on failed/successful branches via the yml syntax? I can’t seem to find this syntax documented anywhere.

My objectives are:

  • Notify slack via webhook URL
  • Only on failed/first successful builds
  • Only for a subset of branches

I’m guessing this just goes in the root of the yml v2.0 file as well?



Not at this time. You’d have to manually curl something for that to work.


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.