fix daily perf Slack notification (#6267)

This PR fixes the Slack notification on daily perf runs. It also updates
the perf sha.

CHANGELOG_BEGIN
CHANGELOG_END
This commit is contained in:
Gary Verhaegen 2020-06-09 08:45:58 +02:00 committed by GitHub
parent e7017e6943
commit 664df64e13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 7 deletions

View File

@ -100,4 +100,4 @@ jobs:
displayName: measure perf
- template: ../daily_tell_slack.yml
parameters:
success-message: '$(cat $(Build.StagingDirectory)/perf-results.json | jq . | jq -sR ''{"text": "perf for ''"$COMMIT_LINK"'':```\(.)```"}'')'
success-message: '$(cat $(Build.StagingDirectory)/perf-results.json | jq . | jq -sR ''"perf for ''"$COMMIT_LINK"'':```\(.)```"'')'

View File

@ -1 +1 @@
2a05bb877ec5333008e3c6546022800dd58f419f
00972f38b56d70acd91f60d2e813900a38973254

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
parameters:
success-message: '"$(Agent.JobName) passed: $COMMIT_LINK"'
success-message: '\"$(Agent.JobName) passed: $COMMIT_LINK\"'
steps:
- bash: |
@ -13,17 +13,20 @@ steps:
if [ "$(Agent.JobStatus)" != "Succeeded" ]; then
MESSAGE=":fire: :fire: <!here> :fire: :fire:\n$(Agent.JobName) *FAILED*: $COMMIT_LINK\n:fire: :fire:"
else
MESSAGE=${{ parameters['success-message'] }}
MESSAGE="${{ parameters['success-message'] }}"
fi
PAYLOAD="{\"text\":\"$MESSAGE\n\"}"
PAYLOAD="{\"text\":$MESSAGE}"
echo curl -XPOST \
-i \
-H 'Content-type: application/json' \
--data "$PAYLOAD" \
Slack.team-daml
if [ "$(Build.SourceBranchName)" = "master" ]; then
curl -XPOST \
-i \
-H 'Content-type: application/json' \
--data "$PAYLOAD" \
$(Slack.team-daml)
else
echo "$PAYLOAD"
fi
displayName: report
condition: always()