Skip to content

Commit

Permalink
[ci] Fix apt-get install unable locate package issue. (#1212) (#1218)
Browse files Browse the repository at this point in the history
Cherry pick tow commits in master branch:

2bbe97f [ci] Continue on error when running test.
749b393 [ci] Fix apt-get install unable locate package issue. (#1212)
  • Loading branch information
liushilongbuaa committed Mar 13, 2023
1 parent cf9a66b commit e1094cf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .azure-pipelines/build-docker-sonic-vs-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
path: $(Build.ArtifactStagingDirectory)/download
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
allowPartiallySucceededBuilds: true
displayName: "Download sonic swss common deb packages"
- task: DownloadPipelineArtifact@2
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .azure-pipelines/build-swss-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
git status
displayName: Set up sonic-swss branch
- script: |
set -ex
sudo apt-get update
sudo apt-get install -y libhiredis0.14 libhiredis-dev
sudo apt-get install -y libzmq5 libzmq3-dev
sudo apt-get install -qq -y \
Expand All @@ -76,6 +78,7 @@ jobs:
artifact: ${{ parameters.swss_common_artifact_name }}
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
allowPartiallySucceededBuilds: true
path: $(Build.ArtifactStagingDirectory)/download
patterns: |
libswsscommon_1.0.0_*.deb
Expand Down
3 changes: 3 additions & 0 deletions .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ jobs:
clean: true
submodules: true
- script: |
set -ex
sudo apt-get update
sudo apt-get install -qq -y \
qtbase5-dev \
libdbus-glib-1-2 \
Expand Down Expand Up @@ -137,6 +139,7 @@ jobs:
artifact: ${{ parameters.swss_common_artifact_name }}
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
allowPartiallySucceededBuilds: true
path: $(Build.ArtifactStagingDirectory)/download
displayName: "Download sonic swss common deb packages"
- script: |
Expand Down
1 change: 1 addition & 0 deletions .azure-pipelines/build_and_install_module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function build_and_install_kmodule()
SUBLEVEL=$(echo $KERNEL_MAINVERSION | cut -d. -f3)

# Install the required debian packages to build the kernel modules
apt-get update
apt-get install -y build-essential linux-headers-${KERNEL_RELEASE} autoconf pkg-config fakeroot
apt-get install -y flex bison libssl-dev libelf-dev
apt-get install -y libnl-route-3-200 libnl-route-3-dev libnl-cli-3-200 libnl-cli-3-dev libnl-3-dev
Expand Down
4 changes: 4 additions & 0 deletions .azure-pipelines/test-docker-sonic-vs-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ jobs:
path: $(Build.ArtifactStagingDirectory)/download
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
allowPartiallySucceededBuilds: true
displayName: "Download sonic swss common deb packages"

- script: |
set -ex
sudo sonic-sairedis/.azure-pipelines/build_and_install_module.sh
sudo apt-get update
sudo apt-get install -y libhiredis0.14 libyang0.16
sudo dpkg -i --force-confask,confnew $(Build.ArtifactStagingDirectory)/download/libswsscommon_1.0.0_amd64.deb || apt-get install -f
sudo dpkg -i $(Build.ArtifactStagingDirectory)/download/python3-swsscommon_1.0.0_amd64.deb
Expand Down Expand Up @@ -82,6 +84,8 @@ jobs:
fi
rm -rf $(Build.ArtifactStagingDirectory)/download
displayName: "Run vs tests"
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
continueOnError: true
- task: PublishTestResults@2
inputs:
Expand Down

0 comments on commit e1094cf

Please sign in to comment.