CircleCI-Public / slack-orb

Create custom Slack notifications for CircleCI job statuses
https://circleci.com/developer/orbs/orb/circleci/slack
MIT License
215 stars 204 forks source link

Handle Build Error to notify the error to slack #247

Closed kamillle closed 3 years ago

kamillle commented 3 years ago

Describe Request:

I want slack-orb to handle Build Error that caused by invalid yaml syntax etc to notify the error to slack. I imagine the webhook style notification like below image. image

Let me know how to do this if this orb already supports the error handling 🙇

Examples:

version: '2.1'
orbs:
  slack: circleci/slack@4.1
jobs:
  notify:
    docker:
      - image: 'cimg/base:stable'
    steps:
      - slack/notify:
        # this causes syntax error
        event: pass 
          template: basic_success_1

workflows:
  send-notification:
    jobs:
      - notify:
          context: slack-secrets

Supporting Documentation Links:

N/A

khinewaioo commented 3 years ago

@kamillle

how about to add intent in front of event.

- slack/notify:
     event: pass 
     template: basic_success_1
gmemstr commented 3 years ago

Because of the way invalid YAML is handled within CircleCI, this is unfortunately not possible.