wantedly / step-pretty-slack-notify

Posts wercker build/deploy status to a Slack channel
MIT License
88 stars 34 forks source link

Requires Ruby box, doesn't work with Node.js #30

Closed kortemy closed 7 years ago

kortemy commented 8 years ago

I tried using this notifier with my Node.js app, and it failed. This is the error message:

export WERCKER_STEP_ROOT="/pipeline/pretty-slack-notify-b0099240-54b5-4044-bb13-a1a3fea8474d"
export WERCKER_STEP_ID="pretty-slack-notify-b0099240-54b5-4044-bb13-a1a3fea8474d"
export WERCKER_STEP_OWNER="wantedly"
export WERCKER_STEP_NAME="pretty-slack-notify"
export WERCKER_REPORT_NUMBERS_FILE="/report/pretty-slack-notify-b0099240-54b5-4044-bb13-a1a3fea8474d/numbers.ini"
export WERCKER_REPORT_MESSAGE_FILE="/report/pretty-slack-notify-b0099240-54b5-4044-bb13-a1a3fea8474d/message.txt"
export WERCKER_REPORT_ARTIFACTS_DIR="/report/pretty-slack-notify-b0099240-54b5-4044-bb13-a1a3fea8474d/artifacts"
export WERCKER_PRETTY_SLACK_NOTIFY_BRANCHES=""
export WERCKER_PRETTY_SLACK_NOTIFY_NOTIFY_ON=""
export WERCKER_PRETTY_SLACK_NOTIFY_WEBHOOK_URL="https://hooks.slack.com/services/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"
export WERCKER_PRETTY_SLACK_NOTIFY_CHANNEL="build"
export WERCKER_PRETTY_SLACK_NOTIFY_USERNAME=""
source "/pipeline/pretty-slack-notify-b0099240-54b5-4044-bb13-a1a3fea8474d/run.sh" < /dev/null
You need to use a box that installed ruby.
dtan4 commented 8 years ago

Please install Ruby before executing pretty-slack-notify.

wercker.yml should be written as below:

build:
    after-steps:
        - install-packages:
            packages: ruby
        - wantedly/pretty-slack-notify:
            webhook_url: $SLACK_WEBHOOK_URL