diff --git a/.azure-pipelines/templates/steps/tox-steps.yml b/.azure-pipelines/templates/steps/tox-steps.yml index 427c52d31..9cb84aa3a 100644 --- a/.azure-pipelines/templates/steps/tox-steps.yml +++ b/.azure-pipelines/templates/steps/tox-steps.yml @@ -41,7 +41,7 @@ steps: ln -s $(testFarmPem.secureFilePath) tests/letstest/test-farm.pem condition: contains(variables['TOXENV'], 'test-farm') - bash: | - export TARGET_BRANCH="${BUILD_SOURCEBRANCHNAME}" + export TARGET_BRANCH="${BUILD_SOURCEBRANCH/refs\/(heads|tags)\//}" [ -z "${SYSTEM_PULLREQUEST_TARGETBRANCH}" ] || export TARGET_BRANCH="${SYSTEM_PULLREQUEST_TARGETBRANCH}" env if [[ "${TOXENV}" == *"oldest"* ]]; then