mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
5f9db11663
And here I was, thinking our builds had gotten more stable as of late.
😢
CHANGELOG_BEGIN
CHANGELOG_END
25 lines
1.1 KiB
YAML
25 lines
1.1 KiB
YAML
# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
parameters:
|
|
trigger_sha: ''
|
|
|
|
steps:
|
|
- bash: |
|
|
set -euo pipefail
|
|
COMMIT_TITLE=$(git log --pretty=format:%s -n1 ${{ parameters.trigger_sha }})
|
|
COMMIT_LINK="<https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|$COMMIT_TITLE>"
|
|
if [ -z "${{ parameters.trigger_sha }}" ]; then
|
|
WARNING="<!here> *FAILED* $(Build.SourceBranchName)/$(Agent.JobName): $COMMIT_LINK"
|
|
else
|
|
WARNING=":fire: :fire: :fire: :fire: :fire:\n<!here> *RELEASE FAILED* $(Build.SourceBranchName)/$(Agent.JobName): $COMMIT_LINK\n:fire: :fire: :fire: :fire: :fire:"
|
|
fi
|
|
curl -XPOST \
|
|
-i \
|
|
-H 'Content-type: application/json' \
|
|
--data "{\"text\":\"$WARNING\n\"}" \
|
|
$(Slack.team-daml)
|
|
condition: and(failed(),
|
|
or(eq(variables['Build.SourceBranchName'], 'master'),
|
|
startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')))
|