mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 16:57:40 +03:00
00224c2480
One of the outputs of our brainstorming about how to make CI better was that it is annoying to have to "babysit" pull requests. This PR attempts to introduce a notification mechanism by which Azure will notify people on Slack when a build finishes, so they know they need to go and rerun or merge the corresponding PR. This commit also changes the existing $Slack.URL variable to $Slack.team-daml, to make more explicit where the Slack message is being sent to (Slack works with one token per destination channel). Both $Slack.URL and $Slack.team-daml are currently defined as the same token in Azure. CHANGELOG_BEGIN CHANGELOG_END
11 lines
451 B
YAML
11 lines
451 B
YAML
steps:
|
|
- bash: |
|
|
set -euo pipefail
|
|
MESSAGE=$(git log --pretty=format:%s -n1)
|
|
curl -XPOST \
|
|
-i \
|
|
-H 'Content-type: application/json' \
|
|
--data "{\"text\":\"<!here> *FAILED* $(Agent.JobName): <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|$MESSAGE>\n\"}" \
|
|
$(Slack.team-daml)
|
|
condition: and(failed(), eq(variables['Build.SourceBranchName'], 'master'))
|