All Projects → arbourd → concourse-slack-alert-resource

arbourd / concourse-slack-alert-resource

Licence: MIT license
A structured Slack notification resource for Concourse

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to concourse-slack-alert-resource

keyval-resource
a resource that passes key values between jobs
Stars: ✭ 39 (-4.88%)
Mutual labels:  resource, concourse
ansible-concourse
An ansible role to manage Concourse CI
Stars: ✭ 22 (-46.34%)
Mutual labels:  concourse
Awesome Elementor
A collection of third party add-ons for the Elementor page builder plugin.
Stars: ✭ 201 (+390.24%)
Mutual labels:  resource
UltimateGitResource
📚 The ultimate collection of git commands and resources to power up your programming!
Stars: ✭ 388 (+846.34%)
Mutual labels:  resource
Divi Resources
A curated list of awesome Divi resources
Stars: ✭ 213 (+419.51%)
Mutual labels:  resource
dhall-concourse
Library to type check concourse configurations in dhall
Stars: ✭ 19 (-53.66%)
Mutual labels:  concourse
Jsonapi Utils
Build JSON API-compliant APIs on Rails with no (or less) learning curve.
Stars: ✭ 191 (+365.85%)
Mutual labels:  resource
concourse-fly-resource
A Concourse resource for manipulating fly
Stars: ✭ 16 (-60.98%)
Mutual labels:  concourse
cf-ops-automation
a collaboration framework for operating cloudfoundry and services at scale
Stars: ✭ 21 (-48.78%)
Mutual labels:  concourse
Awesome-CyberSec-Resources
An awesome collection of curated Cyber Security resources(Books, Tutorials, Blogs, Podcasts, ...)
Stars: ✭ 273 (+565.85%)
Mutual labels:  resource
Free Programming Books
📚 Freely available programming books
Stars: ✭ 216,030 (+526802.44%)
Mutual labels:  resource
Style Resources Loader
CSS processor resources loader for webpack
Stars: ✭ 214 (+421.95%)
Mutual labels:  resource
qresExtract
Qt binary resource (qres) extractor
Stars: ✭ 26 (-36.59%)
Mutual labels:  resource
Juggle
juggle是一个极简的、组件式的js框架。无依赖,完美闭包,灵活且适合渐进学习,可与任何框架整合。包含(支持冒泡的事件 || Tween || MV框架 || http || websocket || 资源 || 模块)等组件,按需选择组件,不绑架开发者。
Stars: ✭ 208 (+407.32%)
Mutual labels:  resource
pulumi-resource
Pulumi Resource Type for Concourse
Stars: ✭ 16 (-60.98%)
Mutual labels:  concourse
Resourcelib
C# File Resource Management Library
Stars: ✭ 197 (+380.49%)
Mutual labels:  resource
Resourcedoc
Share the swift resource for iOS dev
Stars: ✭ 251 (+512.2%)
Mutual labels:  resource
kubernetes-resource
[DEPLICATED] This repository is no longer actively maintained.
Stars: ✭ 92 (+124.39%)
Mutual labels:  concourse
maven-resource
Maven Repository Manager Concourse Resource
Stars: ✭ 22 (-46.34%)
Mutual labels:  concourse
terraform-provider-concourse
A terraform provider for Concourse
Stars: ✭ 49 (+19.51%)
Mutual labels:  concourse

Build Status Go Report Card

concourse-slack-alert-resource

A structured and opinionated Slack notification resource for Concourse.

The message is built by using Concourse's resource metadata to show the pipeline, job, build number and a URL.

Installing

Use this resource by adding the following to the resource_types section of a pipeline config:

resource_types:

- name: slack-alert
  type: docker-image
  source:
    repository: arbourd/concourse-slack-alert-resource

See the Concourse docs for more details on adding resource_types to a pipeline config.

Source Configuration

  • url: Required. Slack webhook URL.
  • channel: Optional. Target channel where messages are posted. If unset the default channel of the webhook is used.
  • concourse_url: Optional. The external URL that points to Concourse. Defaults to the env variable ATC_EXTERNAL_URL.
  • username: Optional. Concourse local user (or basic auth) username. Required for non-public pipelines if using alert type fixed or broke
  • password: Optional. Concourse local user (or basic auth) password. Required for non-public pipelines if using alert type fixed or broke
  • disable: Optional. Disables the resource (does not send notifications). Defaults to false.

Behavior

check: No operation.

in: No operation.

out: Send a message to Slack.

Sends a structured message to Slack based on the alert type.

Parameters

  • alert_type: Optional. The type of alert to send to Slack. See Alert Types. Defaults to default.
  • channel: Optional. Channel where this message is posted. Defaults to the channel setting in Source.
  • channel_file: Optional. File containing text which overrides channel. If the file cannot be read, channel will be used instead.
  • message: Optional. The status message at the top of the alert. Defaults to name of alert type.
  • message_file: Optional. File containing text which overrides message. If the file cannot be read, message will be used instead.
  • text: Optional. Additional text below the message of the alert. Defaults to an empty string.
  • text_file: Optional. File containing text which overrides text. If the file cannot be read, text will be used instead.
  • color: Optional. The color of the notification bar as a hexadecimal. Defaults to the icon color of the alert type.
  • disable: Optional. Disables the alert. Defaults to false.

Alert Types

  • default

  • success

  • failed

  • started

  • aborted

  • errored

  • fixed

    Fixed is a special alert type that only alerts if the previous build did not succeed. Fixed requires username and password to be set for the resource if the pipeline is not public.

  • broke

    Broke is a special alert type that only alerts if the previous build succeed. Broke requires username and password to be set for the resource if the pipeline is not public.

Examples

Out

Using the default alert type with custom message and color:

resources:
- name: notify
  type: slack-alert
  source:
    url: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

jobs:
  # ...
  plan:
  - put: notify
    params:
      message: Completed
      color: "#eeeeee"

Using built-in alert types with appropriate build hooks:

resources:
- name: notify
  type: slack-alert
  source:
    url: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

jobs:
  # ...
  plan:
  - put: notify
    params:
      alert_type: started
  - put: some-other-task
    on_success:
      put: notify
      params:
        alert_type: success
    on_failure:
      put: notify
      params:
        alert_type: failed
    on_abort:
      put: notify
      params:
        alert_type: aborted
    on_error:
      put: notify
      params:
        alert_type: errored

Using the fixed alert type:

resources:
- name: notify
  type: slack-alert
  source:
    url: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
    # `alert_type: fixed` requires Concourse credentials if pipeline is private
    username: concourse
    password: concourse

jobs:
  # ...
  plan:
  - put: some-other-task
    on_success:
      put: notify
      params:
        # will only alert if build was successful and fixed
        alert_type: fixed
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].