Code Monkey home page Code Monkey logo

Comments (2)

szyn avatar szyn commented on August 13, 2024

Hi, @giiita. Thank you for reporting this issue.

It looks like have a problem with the workflow definition.
If you want to write plugins settings as the other file, you have to read those params from _export.

For example:

1. Create a file for params

Write params to use the plugin...etc. (such as common parameters in this project)

params.dig

plugin:
repositories:
    - https://jitpack.io
dependencies:
    - com.github.szyn:digdag-slack:0.1.2
webhook_url: https://hooks.slack.com/services/X/X/X
ENV: develop

NOTE: _export: is not necessary.

2. Create a template for notification

template.yml (no changes)

---
username: digdag
channel: "XXX"
icon_url: https://XXX
attachments:
- fallback: '[FAILED] ${env_name} ${task_name}'
color: "danger"
text: '*[FAILED]* ${env_name} `${task_name}`'
mrkdwn_in:
- text
- pretext
- fields
fields:
- title: Error Message
    value: "`${error.message}`"
    short: false
- title: Error Stacktrace
    value: "```${error.stacktrace}```"
    short: false
- title: Session Local Time
    value: "${session_local_time}"
    short: true
- title: Env
    value: "${env_name}"
    short: true

3. Some make changes workflow file

execute.dig

timezone: Asia/Tokyo

_export:
!include : params.dig  # **IMPORTANT** load params from another file
target: XXX

+create-job:
sh>: "curl -s ${target} | run -"

+check-job:
sh>: "./check-job.sh - ${target}"
_error:
    sh>: "curl -s ${target} | drop -"

+delete-job:
sh>: "curl -s ${target} | drop -"

_error:
slack>: template.yml

Then, everything will be OK.
If you let me know when you get another error.

from digdag-slack.

giiita avatar giiita commented on August 13, 2024

Thanks.

from digdag-slack.

Related Issues (8)

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.