Skip to content

Commit

Permalink
slack on master failure (digital-asset#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
garyverhaegen-da authored and mergify[bot] committed Apr 26, 2019
1 parent 0ba1e5b commit f9318bf
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ jobs:
- template: ci/build-unix.yml
parameters:
name: linux
- bash: |
set -euo pipefail
MESSAGE=$(git log --pretty=format:%s -n1)
curl -XPOST \
-H 'Content-type: application/json' \
--data "{\"text\":\"@channel *FAILED*: <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
$(Slack.URL)
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
- job: macos
timeoutInMinutes: 360
Expand All @@ -34,13 +42,29 @@ jobs:
- template: ci/build-unix.yml
parameters:
name: macos
- bash: |
set -euo pipefail
MESSAGE=$(git log --pretty=format:%s -n1)
curl -XPOST \
-H 'Content-type: application/json' \
--data "{\"text\":\"@channel *FAILED*: <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
$(Slack.URL)
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
- job: windows
timeoutInMinutes: 360
pool:
vmImage: 'vs2017-win2016'
steps:
- template: ci/build-windows.yml
- bash: |
set -euo pipefail
MESSAGE=$(git log --pretty=format:%s -n1)
curl -XPOST \
-H 'Content-type: application/json' \
--data "{\"text\":\"@channel *FAILED*: <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
$(Slack.URL)
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
- job: perf
timeoutInMinutes: 60
Expand All @@ -65,6 +89,14 @@ jobs:
inputs:
pathtoPublish: '$(Build.StagingDirectory)'
artifactName: 'Perf test logs'
- bash: |
set -euo pipefail
MESSAGE=$(git log --pretty=format:%s -n1)
curl -XPOST \
-H 'Content-type: application/json' \
--data "{\"text\":\"@channel *FAILED*: <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
$(Slack.URL)
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
- job: release
dependsOn: [ "linux", "macos", "windows", "perf"]
Expand Down Expand Up @@ -109,3 +141,11 @@ jobs:
assetUploadMode: 'replace'
addChangeLog: false
isPrerelease: true
- bash: |
set -euo pipefail
MESSAGE=$(git log --pretty=format:%s -n1)
curl -XPOST \
-H 'Content-type: application/json' \
--data "{\"text\":\"@channel *FAILED*: <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
$(Slack.URL)
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
2 changes: 1 addition & 1 deletion ci/build-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ steps:
- bash: ./fmt.sh --test
displayName: 'Platform-agnostic lints and checks'
condition: eq(variables['Agent.OS'], 'Linux')
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))

- bash: ci/configure-bazel.sh
displayName: 'Configure Bazel'
Expand Down

0 comments on commit f9318bf

Please sign in to comment.