最近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.11change 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
ついでにアイコンやら名前などもセットしてみる
できた!