1

How can I set-up the Jenkins build to report the results on slack channel only for master branch?

I have the Jenkins build configured (somewhat like https://stackoverflow.com/a/30727490/3609252 ) where Slack Notifications > Project Channel points to the #slack_channel, but this reports all buld reports (including feature branches) into the slack channel which makes it a bit noisy.

Is there a way just to report the build results from the master branch of the repo?

Community
  • 1
  • 1
Mahyar
  • 1,011
  • 2
  • 17
  • 37

1 Answers1

0

As a workaround, you can setup 2 Jenkins jobs:

  • one only for master, with a Slack integration in place (though post-receive hook or webhook)
  • one for any other branches, without any Slack integration.
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250