daml/ci/tell-slack-failed.yml
Gary Verhaegen 1168e35455
run more things on main-2.x (#18154)
Specifically:

- m1 builds
- BlackDuck & notices bump
- daily compatibility tests
- daily compat update (if needed)
- daily perf test & report

Also, merge the canton update jobs as that makes a lot more sense at
this point. Future divergences can be expressed by changing the files in
their respective branches.

This PR will need to be backported to main-2.x to fully take effect.
2024-01-12 21:05:47 +01:00

31 lines
1.3 KiB
YAML

# Copyright (c) 2023 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
parameters:
trigger_sha: ''
steps:
- template: bash-lib.yml
parameters:
var_name: bash_lib
- bash: |
set -euo pipefail
source $(bash_lib)
COMMIT_TITLE="$(escape_slack "$(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="*FAILED* $(Build.SourceBranchName)/$(Agent.JobName) [$(Agent.MachineName)]: $COMMIT_LINK"
else
WARNING=":fire: :fire: :fire: :fire: :fire:\n*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.ci-failures-daml)
name: tell_slack_failed
condition: and(failed(),
or(eq(variables['Build.SourceBranchName'], 'main'),
eq(variables['Build.SourceBranchName'], 'main-2.x'),
startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')))