Просмотр исходного кода

fix wercker.yml (release)

* add debug line
* add pretty-slack-notify
Yuki Takei 9 лет назад
Родитель
Сommit
6a9827bdcd
2 измененных файлов с 31 добавлено и 5 удалено
  1. 13 0
      bin/wercker/trigger-crowi-plus-docker.sh
  2. 18 5
      wercker.yml

+ 13 - 0
bin/wercker/trigger-crowi-plus-docker.sh

@@ -10,6 +10,19 @@
 #   - $CROWI_PLUS_DOCKER_PIPELINE_ID
 #   - $RELEASE_VERSION
 #
+DATA=`echo '{ \
+    "pipelineId": "'$CROWI_PLUS_DOCKER_PIPELINE_ID'", \
+    "branch": "release", \
+    "envVars": [ \
+      { \
+        "key": "RELEASE_VERSION", \
+        "value": "'$RELEASE_VERSION'" \
+      } \
+    ] \
+  }' \
+`
+echo $DATA
+
 RESPONSE=`curl -X POST \
   -H "Content-Type: application/json" \
   -H "Authorization: Bearer $WERCKER_TOKEN" \

+ 18 - 5
wercker.yml

@@ -27,6 +27,10 @@ test:
         echo "export MONGO_URI=$MONGO_URI"
         npm test
 
+    - wantedly/pretty-slack-notify:
+      webhook_url: $SLACK_WEBHOOK_URL
+      notify_on: "failed"
+
 
 build-prod:
   steps:
@@ -49,6 +53,10 @@ build-prod:
       code: |
         npm run build:prod
 
+    - wantedly/pretty-slack-notify:
+      webhook_url: $SLACK_WEBHOOK_URL
+      notify_on: "failed"
+
 
 build-dev:
   steps:
@@ -71,14 +79,15 @@ build-dev:
       code: |
         npm run build:dev
 
+    - wantedly/pretty-slack-notify:
+      webhook_url: $SLACK_WEBHOOK_URL
+      notify_on: "failed"
+
 
 release: # would be run on release branch
   steps:
-    - script:
-      name: install jq
-      code: |
-        apt-get update
-        apt-get install -y jq
+    - install-packages:
+      packages: jq ruby
 
     - script:
       name: bump version
@@ -112,3 +121,7 @@ release: # would be run on release branch
       name: trigger crowi-plus-docker release pipeline
       code: |
         sh ./bin/wercker/trigger-crowi-plus-docker.sh
+
+    - wantedly/pretty-slack-notify:
+      webhook_url: $SLACK_WEBHOOK_URL
+      passwd_message: :anchor: crowi-plus v$RELEASE_VERSION has been released!