From 4e500600214dbfd9e5ec815e1008ef0d19a7da0a Mon Sep 17 00:00:00 2001 From: Gary Verhaegen Date: Fri, 26 Nov 2021 17:50:53 +0100 Subject: [PATCH] self-service compat: set branch name to not main (#11902) The "tell slack about failures" step is conditional on the branch name being main; for whatever reason if we don't supply a branch name Azure sets it to `main`, regardless of the fact that the commit is not in that branch at all. CHANGELOG_BEGIN CHANGELOG_END --- azure-pipelines.yml | 4 ++-- ci/bash-lib.yml | 10 +++++----- ci/prs.yml | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33c8492531..b74746ff3d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -217,5 +217,5 @@ jobs: - bash: | set -euo pipefail source $(bash-lib) - trigger_azure $(System.AccessToken) --branch $(branch) PRs - trigger_azure $(System.AccessToken) --branch $(branch) digital-asset.daml-daily-compat + trigger_azure $(System.AccessToken) PRs --branch $(branch) + trigger_azure $(System.AccessToken) digital-asset.daml-daily-compat --branch $(branch) diff --git a/ci/bash-lib.yml b/ci/bash-lib.yml index aa5bbddb58..a4f3311e30 100644 --- a/ci/bash-lib.yml +++ b/ci/bash-lib.yml @@ -160,18 +160,18 @@ steps: } trigger_azure() ( token=$1 - option=$2 - target=$3 - build=$4 + shift + build=$1 + shift az extension add --name azure-devops trap 'az devops logout' EXIT echo $token \ | az devops login --org "https://dev.azure.com/digitalasset" az pipelines build queue \ - $option $target \ --definition-name $build \ --org "https://dev.azure.com/digitalasset" \ - --project daml + --project daml \ + $@ ) END diff --git a/ci/prs.yml b/ci/prs.yml index 73a9bc8fb5..73fd5b42f0 100644 --- a/ci/prs.yml +++ b/ci/prs.yml @@ -186,7 +186,8 @@ jobs: COMMIT=$(git rev-parse HEAD^2) REQUEST=$(git log -n1 --format="%(trailers:key=run-full-compat,valueonly)" $COMMIT) if [ $REQUEST == true ]; then - trigger_azure $AZURE_TOKEN --commit-id $COMMIT digital-asset.daml-daily-compat + # Unfortunately recovering the actual branch name is tricky + trigger_azure $AZURE_TOKEN digital-asset.daml-daily-compat --commit-id $COMMIT --branch not-main fi env: AZURE_TOKEN: $(System.AccessToken)