diff --git a/azurepipeline.yml b/azurepipeline.yml index 3b65ce8..e607d06 100644 --- a/azurepipeline.yml +++ b/azurepipeline.yml @@ -5,12 +5,20 @@ trigger: pr: branches: include: - - "*" + +variables: + - name: BUILD_BRANCH + ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + value: $(System.PullRequest.TargetBranch) + ${{ else }}: + value: $(Build.SourceBranchName) - "*" jobs: - job: Build pool: vmImage: ubuntu-20.04 + container: + image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster:$(BUILD_BRANCH) variables: DIFF_COVER_CHECK_THRESHOLD: 80