Coder Social home page Coder Social logo

shinya-yamanaka-uhuru / digdag-slack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from szyn/digdag-slack

0.0 0.0 0.0 280 KB

digdag-slack is a plugin sending messages to slack :tada: https://www.digdag.io/

License: Apache License 2.0

Java 92.67% Shell 7.33%

digdag-slack's Introduction

digdag-slack

Circle CI

Description

digdag-slack is a plugin sending messages to slack. It can use yaml templates for building messages.

DEMO:

SUCCESS FAILED
sample-good.png sample-danger.png

Features

  • Can use the slack> opetaror
  • Easy to use
  • Flexible templates

Requirement

[Note] If you want to use ${task_name}, you must digdag v0.9.9 and up.

Usage

Also, you can see expamle workflow at sample directory.

  1. Create workflow file (e.g. slack.dig)
_export:
  plugin:
    repositories:
      - https://jitpack.io
    dependencies:
      - com.github.szyn:digdag-slack:0.1.4
  # Set Reqired params
  webhook_url: https://hooks.slack.com/services/XXX/XXX/XXX
  # Set Option params
  workflow_name: slack
  ENV: develop

+step1-1:
  echo>: "Next will be success!"

+step1-2:
  slack>: good-template.yml
  1. Create templates for slack's payload (e.g. good-template.yml)
username: Digdag
icon_emoji: ':blush:'
# channel: '#general' ## if you need to send message to specific channel
attachments:
- fallback: '[SUCCESS] ${workflow_name} workflow'
  color: "good"
  text: '*[SUCCESS]* `${workflow_name}` Workflow'
  mrkdwn_in:
  - text
  - pretext
  - fields
  fields:
  - title: Task Name
    value: "${task_name}"
    short: false
  - title: Session Date
    value: "${session_date}"
    short: true
  - title: Environment
    value: "${ENV}" # You can use exported environment values
    short: true
  1. Runs workflow
$ digdag run -a slack.dig

Secrets

  • slack.webhook_url: The slack incoming webhook url

    _export:
      ...
      # Set Reqired params
      webhook_url: ${secret:slack.webhook_url}

Author

szyn

License

Apache License 2.0

digdag-slack's People

Contributors

grimrose avatar kimurashuhei avatar maitani avatar mia-0032 avatar nureokaki avatar ryysud avatar sonots avatar szyn 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.