Skip to content

Commit

Permalink
Update Azp
Browse files Browse the repository at this point in the history
Signed-off-by: Ze Gan <[email protected]>
  • Loading branch information
Pterosaur committed Dec 2, 2023
1 parent c8b17a0 commit bbab5f6
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 5 deletions.
12 changes: 12 additions & 0 deletions .azure-pipelines/build-docker-sonic-vs-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ jobs:
artifact: ${{ parameters.swss_artifact_name }}
path: $(Build.ArtifactStagingDirectory)/download
displayName: "Download pre-stage built ${{ parameters.swss_artifact_name }}"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: sonic-net.sonic-dash-api
artifact: sonic-dash-api
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
path: $(Build.ArtifactStagingDirectory)/download
patterns: |
libdashapi*.deb
displayName: "Download dash api"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
Expand Down
17 changes: 17 additions & 0 deletions .azure-pipelines/build-sairedis-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,24 @@ jobs:
patterns: |
target/debs/${{ parameters.debian_version }}/libyang-*.deb
target/debs/${{ parameters.debian_version }}/libyang_*.deb
target/debs/${{ parameters.debian_version }}/libprotobuf*.deb
target/debs/${{ parameters.debian_version }}/libprotoc*.deb
target/debs/${{ parameters.debian_version }}/protobuf-compiler*.deb
displayName: "Download libyang from common lib"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: sonic-net.sonic-dash-api
${{ if eq(parameters.arch, 'amd64') }}:
artifact: sonic-dash-api
${{ else }}:
artifact: sonic-dash-api.${{ parameters.arch }}
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
path: $(Build.ArtifactStagingDirectory)/download
patterns: |
libdashapi*.deb
- script: |
set -ex
sudo dpkg -i $(find ./download -name *.deb)
Expand Down
15 changes: 14 additions & 1 deletion .azure-pipelines/build-swss-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,21 @@ jobs:
target/debs/${{ parameters.debian_version }}/libprotobuf*.deb
target/debs/${{ parameters.debian_version }}/libprotoc*.deb
target/debs/${{ parameters.debian_version }}/protobuf-compiler*.deb
target/debs/${{ parameters.debian_version }}/libdashapi*.deb
displayName: "Download common libs"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: sonic-net.sonic-dash-api
${{ if eq(parameters.arch, 'amd64') }}:
artifact: sonic-dash-api
${{ else }}:
artifact: sonic-dash-api.${{ parameters.arch }}
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
path: $(Build.ArtifactStagingDirectory)/download
patterns: |
libdashapi*.deb
- script: |
set -ex
Expand Down
21 changes: 19 additions & 2 deletions .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,29 @@ jobs:
patterns: |
target/debs/${{ parameters.debian_version }}/libyang-*.deb
target/debs/${{ parameters.debian_version }}/libyang_*.deb
displayName: "Download libyang from ${{ parameters.arch }} common lib"
target/debs/${{ parameters.debian_version }}/libprotobuf*.deb
target/debs/${{ parameters.debian_version }}/libprotoc*.deb
displayName: "Download ${{ parameters.arch }} common lib"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: sonic-net.sonic-dash-api
${{ if eq(parameters.arch, 'amd64') }}:
artifact: sonic-dash-api
${{ else }}:
artifact: sonic-dash-api.${{ parameters.arch }}
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
path: $(Build.ArtifactStagingDirectory)/download
patterns: |
libdashapi*.deb
displayName: "Download dash api"
- script: |
set -ex
sudo dpkg -i $(find ./download -name *.deb)
workingDirectory: $(Build.ArtifactStagingDirectory)
displayName: "Install libyang from common lib"
displayName: "Install common libs and dashapi from common lib"
- script: |
set -ex
rm ../*.deb || true
Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines/docker-sonic-vs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ COPY ["debs", "/debs"]
# Remove existing packages first before installing the new/current packages. This is to overcome limitations with
# Docker's diff detection mechanism, where only the file size and the modification timestamp (which will remain the
# same, even though contents have changed) are checked between the previous and current layer.
RUN dpkg --purge libswsscommon python3-swsscommon sonic-db-cli libsaimetadata libsairedis libsaivs syncd-vs swss sonic-eventd
RUN dpkg -i /debs/libswsscommon_1.0.0_amd64.deb /debs/python3-swsscommon_1.0.0_amd64.deb /debs/sonic-db-cli_1.0.0_amd64.deb /debs/libsaimetadata_1.0.0_amd64.deb /debs/libsairedis_1.0.0_amd64.deb /debs/libsaivs_1.0.0_amd64.deb /debs/syncd-vs_1.0.0_amd64.deb /debs/swss_1.0.0_amd64.deb
RUN dpkg --purge libswsscommon python3-swsscommon sonic-db-cli libsaimetadata libsairedis libsaivs syncd-vs swss sonic-eventd libdashapi
RUN dpkg -i /debs/libdashapi_1.0.0_amd64.deb /debs/libswsscommon_1.0.0_amd64.deb /debs/python3-swsscommon_1.0.0_amd64.deb /debs/sonic-db-cli_1.0.0_amd64.deb /debs/libsaimetadata_1.0.0_amd64.deb /debs/libsairedis_1.0.0_amd64.deb /debs/libsaivs_1.0.0_amd64.deb /debs/syncd-vs_1.0.0_amd64.deb /debs/swss_1.0.0_amd64.deb

0 comments on commit bbab5f6

Please sign in to comment.