Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Fix apt-get install unable locate package issue. (#1212) #1219

Merged
merged 3 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -62,6 +62,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 @@ -101,6 +103,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
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 All @@ -67,6 +69,8 @@ jobs:
sudo py.test -v --force-flaky --junitxml=tr.xml --imgname=docker-sonic-vs:$(Build.DefinitionName).$(Build.BuildNumber)
rm -rf $(Build.ArtifactStagingDirectory)/download
displayName: "Run vs tests"
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
continueOnError: true

- task: PublishTestResults@2
inputs:
Expand Down