Giter Site home page Giter Site logo

thinkalpha / slack-orb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from circleci-public/slack-orb

0.0 1.0 0.0 739 KB

Create custom Slack notifications for CircleCI job statuses

Home Page: https://circleci.com/developer/orbs/orb/circleci/slack

License: MIT License

Shell 100.00%

slack-orb's Introduction

Slack Orb CircleCI Build Status CircleCI Orb Version GitHub license CircleCI Community

Send Slack notifications from your CircleCI pipelines even easier with Slack Orb 4.0

What are Orbs?

Usage

Setup

In order to use the Slack Orb on CircleCI you will need to create a Slack App and provide an OAuth token. Find the guide in the wiki: How to setup Slack orb

Use In Config

For full usage guidelines, see the Orb Registry listing.

Templates

The Slack Orb comes with a number of included templates to get your started with minimal setup. Feel free to use an included template or create your own.

Template Preview Template Description
basic_success_1 basic_success_1 Should be used with the "pass" event.
basic_fail_1 basic_fail_1 Should be used with the "fail" event.
success_tagged_deploy_1 success_tagged_deploy_1 To be used in the event of a successful deployment job. see orb usage examples
basic_on_hold_1 basic_on_hold_1 To be used in the on-hold job. see orb usage examples

Custom Message Template

  1. Open the Slack Block Kit Builder: https://app.slack.com/block-kit-builder/
  2. Design your desired notification message.
  3. Replace any placeholder values with $ENV environment variable strings.
  4. Set the resulting code as the value for your custom parameter.
- slack/notify:
    event: always
    custom: |
      {
        "blocks": [
          {
            "type": "section",
            "fields": [
              {
                "type": "plain_text",
                "text": "*This is a text notification*",
                "emoji": true
              }
            ]
          }
        ]
      }

Branch or Tag Filtering

Limit Slack notifications to particular branches with the "branch_pattern" or "tag_pattern" parameter.

A comma separated list of regex matchable branch or tag names. Notifications will only be sent if sent from a job from these branches/tags. By default ".+" will be used to match all branches/tags. Pattern must match the full string, no partial matches. Keep in mind that "branch_pattern" and "tag_pattern" are mutually exclusive.

See usage examples.


FAQ

View the FAQ in the wiki

Contributing

We welcome issues to and pull requests against this repository!

For further questions/comments about this or other orbs, visit CircleCI's orbs discussion forum.

slack-orb's People

Contributors

7wikd avatar alenros avatar alexmuller avatar blordpluto avatar brandon-leapyear avatar felicianotech avatar fumikony avatar gsaslis avatar iynere avatar junip avatar kyletryon avatar lokst avatar orangegrove1955 avatar parikshit-hooda avatar pbaderia01 avatar peeja avatar rail44 avatar rmacklin avatar ryym avatar samsalisbury avatar scwheele avatar shivam175 avatar skyeagle avatar stig avatar sudiptog81 avatar the-pat avatar thiagoyeds avatar thomasmost avatar tommybo-entur avatar wyardley avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.