From 1b14ec737041c868a720a1837f5ce9e1447312bd Mon Sep 17 00:00:00 2001 From: Kris De Volder Date: Wed, 23 Nov 2016 15:51:35 -0800 Subject: [PATCH] Add build failure notification to concourse pipeline --- concourse/pipeline.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index eb83f180b..86a4c8fa0 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -1,3 +1,9 @@ +resource_types: +- name: slack-notification + type: docker-image + source: + repository: cfcommunity/slack-notification-resource + tag: latest resources: - name: docker-git type: git @@ -8,12 +14,16 @@ resources: private_key: {{rsa_id}} paths: - concourse/docker -- name: sts4-git +- name: sts4 type: git source: uri: git@github.com:spring-projects/sts4.git branch: master private_key: {{rsa_id}} +- name: slack-notification + type: slack-notification + source: + url: https://hooks.slack.com/services/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 - name: docker-image type: docker-image source: @@ -34,12 +44,12 @@ jobs: skip_download: true - name: build-vsix plan: - - get: sts4-git + - get: sts4 trigger: true - task: build-vscode-extensions config: inputs: - - name: sts4-git + - name: sts4 platform: linux image_resource: type: docker-image @@ -47,4 +57,10 @@ jobs: repository: kdvolder/sts4-build-env run: path: "./build-all.sh" - dir: "sts4-git/vscode-extensions" + dir: "sts4/vscode-extensions" + on_failure: + put: slack-notification + params: + channel: "@kdvolder" + text: | + Concourse ${BUILD_JOB_NAME}/${BUILD_NAME} has failed!