From 604787eb07430bbc328b0e1a140b7361a3979e5a Mon Sep 17 00:00:00 2001 From: Gary Verhaegen Date: Thu, 17 Dec 2020 14:32:49 +0100 Subject: [PATCH] fix Slack notifications (#8327) CHANGELOG_BEGIN CHANGELOG_END --- ci/bash-lib.yml | 1 + ci/daily_tell_slack.yml | 2 +- ci/tell-slack-failed.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/bash-lib.yml b/ci/bash-lib.yml index 52d3cb1e7c..55669de213 100644 --- a/ci/bash-lib.yml +++ b/ci/bash-lib.yml @@ -145,3 +145,4 @@ steps: END echo "##vso[task.setvariable variable=${{parameters.var_name}}]$TMP" displayName: install Bash lib + condition: always() diff --git a/ci/daily_tell_slack.yml b/ci/daily_tell_slack.yml index 3afee106af..fcd9d1bd8a 100644 --- a/ci/daily_tell_slack.yml +++ b/ci/daily_tell_slack.yml @@ -12,7 +12,7 @@ steps: set -euo pipefail eval "$(dev-env/bin/dade assist)" source $(bash_lib) - COMMIT_TITLE="$(escape_slack $(git log --pretty=format:%s -n1 ${{ parameters.trigger_sha }}))" + COMMIT_TITLE="$(escape_slack "$(git log --pretty=format:%s -n1 ${{ parameters.trigger_sha }})")" COMMIT_LINK="" if [ "$(Agent.JobStatus)" != "Succeeded" ]; then MESSAGE="\":fire: :fire: :fire: :fire:\n$(Agent.JobName) *FAILED*: $COMMIT_LINK\n:fire: :fire:\"" diff --git a/ci/tell-slack-failed.yml b/ci/tell-slack-failed.yml index 7c84d935d7..1fee318e97 100644 --- a/ci/tell-slack-failed.yml +++ b/ci/tell-slack-failed.yml @@ -11,7 +11,7 @@ steps: - bash: | set -euo pipefail source $(bash_lib) - COMMIT_TITLE="$(escape_slack $(git log --pretty=format:%s -n1 ${{ parameters.trigger_sha }}))" + COMMIT_TITLE="$(escape_slack "$(git log --pretty=format:%s -n1 ${{ parameters.trigger_sha }})")" COMMIT_LINK="" if [ -z "${{ parameters.trigger_sha }}" ]; then WARNING=" *FAILED* $(Build.SourceBranchName)/$(Agent.JobName): $COMMIT_LINK"