Notifications on nightly build failures



We use the nightly feature of Circle 2.0 to run tests nightly. We would like to receive a Slack notification for this nightly build if it fails, without turning on Slack notifications for all builds or workflows. We are using CircleCI Enterprise. Is this possible?

Sample of our config.yml:

      - schedule:
          cron: "0 11 * * *"
                - master
      - run_all_tests


As far as I know, nightly is a word of your choosing, so there’s no “nightly” feature, as such. You’re using the schedule feature, which in your case runs at 11am every morning (based on East-coast US server time, I would guess).

I don’t think your selective notifications are possible out of the box, but you could look at the Circle API. You could scan that with a script and push a message to Slack if it finds a recent failed build. That could be run as another scheduled build process in Circle, in fact.

Actually, that may be over-complicating it. You could just run something inside the same build process to send you a Slack message on failure. The only minor issue here is detecting that the build has been done on the nightly trigger rather than on push - you could use the time to detect that.


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