Skip to content

Commit

Permalink
[Ci] Upgrade to bullseye and fix the branch reference issue (sonic-ne…
Browse files Browse the repository at this point in the history
  • Loading branch information
xumia authored Dec 1, 2022
1 parent 4b528a0 commit b20896c
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,41 @@ variables:
DIFF_COVER_CHECK_THRESHOLD: 50
DIFF_COVER_ENABLE: 'true'
DIFF_COVER_WORKING_DIRECTORY: $(System.DefaultWorkingDirectory)
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
BRANCH_NAME: $(System.PullRequest.TargetBranch)
${{ else }}:
BRANCH_NAME: $(Build.SourceBranchName)


pool:
vmImage: 'ubuntu-20.04'

container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster:latest
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye:latest

steps:
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 1
pipeline: 142
artifact: sonic-buildimage.vs
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
runBranch: 'refs/heads/$(BRANCH_NAME)'
displayName: "Download artifacts from latest sonic-buildimage build"

- script: |
set -xe
sudo apt-get -y purge libhiredis-dev libnl-3-dev libnl-route-3-dev
sudo dpkg -i libnl-3-200_*.deb
sudo dpkg -i libnl-genl-3-200_*.deb
sudo dpkg -i libnl-route-3-200_*.deb
sudo dpkg -i libnl-nf-3-200_*.deb
sudo dpkg -i libhiredis0.14_*.deb
sudo dpkg -i libswsscommon_1.0.0_amd64.deb
sudo dpkg -i python-swsscommon_1.0.0_amd64.deb
sudo dpkg -i python3-swsscommon_1.0.0_amd64.deb
workingDirectory: $(Pipeline.Workspace)/target/debs/buster/
sudo dpkg -i libyang_1.0.73_amd64.deb \
libnl-3-200_*.deb \
libnl-genl-3-200_*.deb \
libnl-route-3-200_*.deb \
libnl-nf-3-200_*.deb \
libhiredis0.14_*.deb \
libswsscommon_1.0.0_amd64.deb \
python3-swsscommon_1.0.0_amd64.deb
workingDirectory: $(Pipeline.Workspace)/target/debs/bullseye/
displayName: 'Install Debian dependencies'

- script: |
Expand All @@ -51,14 +56,15 @@ steps:
sudo pip3 install sonic_yang_mgmt-1.0-py3-none-any.whl
sudo pip3 install sonic_yang_models-1.0-py3-none-any.whl
sudo pip3 install sonic_config_engine-1.0-py3-none-any.whl
workingDirectory: $(Pipeline.Workspace)/target/python-wheels/buster/
workingDirectory: $(Pipeline.Workspace)/target/python-wheels/bullseye/
displayName: 'Install Python dependencies'

- script: |
set -ex
# Install .NET CORE
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-add-repository https://packages.microsoft.com/debian/10/prod
. /etc/os-release
sudo apt-add-repository https://packages.microsoft.com/debian/$VERSION_ID/prod
sudo apt-get update
sudo apt-get install -y dotnet-sdk-5.0
displayName: "Install .NET CORE"
Expand Down

0 comments on commit b20896c

Please sign in to comment.