tell team-canton-notifications on canton update failures (#18086)

This commit is contained in:
Gary Verhaegen 2024-01-04 19:07:31 +01:00 committed by GitHub
parent faf1604308
commit d48f3130ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -46,7 +46,7 @@ steps:
git -c user.name="Azure Pipelines Daml Build" \ git -c user.name="Azure Pipelines Daml Build" \
-c user.email="support@digitalasset.com" \ -c user.email="support@digitalasset.com" \
commit \ commit \
-m "$(printf "$title\n\n$body\n\nCHANGELOG_BEGIN\nCHANGELOG_END\n")" -m "$(printf "$title\n\n$body\n")"
git push origin $branch:$branch git push origin $branch:$branch
jq -n --arg title "$title" \ jq -n --arg title "$title" \
--arg branch "$branch" \ --arg branch "$branch" \

View File

@ -277,7 +277,7 @@ jobs:
else else
if [ "main" = "$(Build.SourceBranchName)" ]; then if [ "main" = "$(Build.SourceBranchName)" ]; then
git add build.sh test-common/canton/BUILD.bazel git add build.sh test-common/canton/BUILD.bazel
open_pr "$branch" "update canton to $canton_tag/$canton2_version/$canton3_version" open_pr "$branch" "update canton to $canton_tag/$canton2_version/$canton3_version" "tell-slack: canton"
az extension add --name azure-devops az extension add --name azure-devops
trap "az devops logout" EXIT trap "az devops logout" EXIT
echo "$(System.AccessToken)" | az devops login --org "https://dev.azure.com/digitalasset" echo "$(System.AccessToken)" | az devops login --org "https://dev.azure.com/digitalasset"

View File

@ -115,8 +115,7 @@ jobs:
- job: notify_user - job: notify_user
# No Slack tokens on forks # No Slack tokens on forks
condition: and(eq(variables['Build.Reason'], 'PullRequest'), condition: and(not(canceled()),
not(canceled()),
eq(variables['System.PullRequest.IsFork'], 'False')) eq(variables['System.PullRequest.IsFork'], 'False'))
dependsOn: dependsOn:
- git_sha - git_sha
@ -142,6 +141,10 @@ jobs:
tell_slack "<@${user}> <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|Build $(Build.BuildId)> for <https://github.com/digital-asset/daml/pull/$(pr.num)|PR $(pr.num)> has completed with status $(build_status)." \ tell_slack "<@${user}> <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|Build $(Build.BuildId)> for <https://github.com/digital-asset/daml/pull/$(pr.num)|PR $(pr.num)> has completed with status $(build_status)." \
"$(Slack.team-daml-ci)" "$(Slack.team-daml-ci)"
fi fi
if [ "$(git log -n1 --format="%(trailers:key=tell-slack,valueonly)" HEAD)" = "canton" ]; then
tell_slack "<https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|Build $(Build.BuildId)> for <https://github.com/digital-asset/daml/pull/$(pr.num)|canton update PR $(pr.num)> has completed with status $(build_status)." \
"$(Slack.team-canton-notifications)"
fi
- job: self_service_compat_test - job: self_service_compat_test
pool: pool: