Skip to content

Commit

Permalink
[ci]: download latest docker-sonic-vs from sonic-swss repo
Browse files Browse the repository at this point in the history
ensure the pytest is running against latest sonic-swss binary

Signed-off-by: Guohan Lu <[email protected]>
  • Loading branch information
lguohan committed Apr 4, 2021
1 parent e9cfb32 commit 37376dd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
18 changes: 13 additions & 5 deletions .azure-pipelines/build-docker-sonic-vs-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,32 @@ jobs:
- task: DownloadPipelineArtifact@2
inputs:
artifact: wheels
displayName: "Download sonic swss artifact"
displayName: "Download sonic utilities artifact"

- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 1
artifact: sonic-buildimage.vs
pipeline: 15
artifact: ${{ parameters.artifact_name }}
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
displayName: "Download sonic buildimage"
displayName: "Download docker-sonic-vs artifact"

- script: |
set -ex
echo $(Build.DefinitionName).$(Build.BuildNumber)
docker load < ../target/docker-sonic-vs.gz
docker load < ../docker-sonic-vs.gz
docker images "docker-sonic-vs"
image_id=$(docker images "docker-sonic-vs:Azure.sonic-swss*" -q)
docker tag ${image_id} docker-sonic-vs:latest
docker images "docker-sonic-vs"
mkdir -p .azure-pipelines/docker-sonic-vs/wheels
Expand Down
19 changes: 17 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,29 @@ stages:
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 python3-swsscommon_1.0.0_amd64.deb
sudo dpkg -i libyang_1.0.73_amd64.deb
sudo dpkg -i libyang-cpp_1.0.73_amd64.deb
sudo dpkg -i python3-yang_1.0.73_amd64.deb
workingDirectory: $(Pipeline.Workspace)/target/debs/buster/
displayName: 'Install Debian dependencies'
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 9
artifact: sonic-swss-common
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
displayName: "Download sonic swss common deb packages"

- script: |
set -xe
sudo dpkg -i libswsscommon_1.0.0_amd64.deb
sudo dpkg -i python3-swsscommon_1.0.0_amd64.deb
workingDirectory: $(Pipeline.Workspace)/
displayName: 'Install swss-common dependencies'
- script: |
set -xe
sudo pip3 install swsssdk-2.0.1-py3-none-any.whl
Expand Down

0 comments on commit 37376dd

Please sign in to comment.