LoginSignup
2
2

More than 5 years have passed since last update.

Werckerからの通知がSlackにこなくなった場合の対処法

Posted at

最近CI通知がこないなと思ったら思いっきりこけてた


cd $WERCKER_SOURCE_DIR
$ export WERCKER_STEP_ROOT="/wercker/steps/sherzberg/slack-notify/0.0.11"
$ export WERCKER_STEP_ID="ae60e22b-6735-4fa5-ae3e-64e6d4cd6f99"
$ export WERCKER_STEP_NAME="slack-notify"
$ export WERCKER_REPORT_NUMBERS_FILE="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/numbers.ini"
$ export WERCKER_REPORT_MESSAGE_FILE="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/message.txt"
$ export WERCKER_REPORT_ARTIFACTS_DIR="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/artifacts"
$ mkdir -p $WERCKER_REPORT_ARTIFACTS_DIR
$ export WERCKER_STEP_TEMP="/tmp/$WERCKER_STEP_ID"
$ source '/wercker/wercker-build-essentials/init.sh'
$ mkdir -p $WERCKER_STEP_TEMP
$ export WERCKER_SLACK_NOTIFY_SUBDOMAIN="mydomain"
$ export WERCKER_SLACK_NOTIFY_TOKEN="$SLACK_TOKEN"
$ export WERCKER_SLACK_NOTIFY_CHANNEL="channel-name"
$ source "$WERCKER_STEP_ROOT/run.sh"
-bash: fatal: command not found

sherzberg/wercker-step-slack-notifyのレポジトリを見に行くと

Changelog
0.0.11

change how to specify the channel(Ex. "#room", "@someone")

これだ!!

after-steps:
    - sherzberg/slack-notify:
        subdomain: u-note
        token: $SLACK_TOKEN
-       channel: "channel-name"
+       channel: "#channel-name"
+       username: wercker
+       icon_url: https://avatars3.githubusercontent.com/u/1695193?s=140

ついでにアイコンやら名前などもセットしてみる

Screen_Shot_2014-09-30_at_12_34_50_PM.jpg

できた!

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2