Skip to content

Commit

Permalink
[ci] Use correct bullseye docker image according to source branch.
Browse files Browse the repository at this point in the history
What I did
Use master branch's sonic-slave docker image will lead to build issue on release branches.

How I did it
Use correct docker image according to source branch.

How to verify it
  • Loading branch information
liushilongbuaa authored and mssonicbld committed Dec 5, 2023
1 parent 1a543ae commit cebac83
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ resources:
name: sonic-net/sonic-swss
endpoint: sonic-net

variables:
- name: BUILD_BRANCH
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
value: $(System.PullRequest.TargetBranch)
${{ else }}:
value: $(Build.SourceBranchName)

stages:
- stage: Build

Expand All @@ -26,7 +33,7 @@ stages:
vmImage: ubuntu-20.04

container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye:latest
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye:$(BUILD_BRANCH)

steps:
- script: |
Expand Down

0 comments on commit cebac83

Please sign in to comment.