From ab3ce86b75e55392747a9e4ae1a284494ddb03a9 Mon Sep 17 00:00:00 2001 From: Ze Gan Date: Sat, 9 Dec 2023 08:55:25 +0800 Subject: [PATCH] [Azp]: Fix azp dash dependency (#842) DASH build chain has been moved from sonic-buildimage to its submodule sonic-dash-api. So, this PR is for revising this dependency. Signed-off-by: Ze Gan --- .../build-docker-sonic-vs-template.yml | 12 ++++++++++++ .azure-pipelines/build-swss-template.yml | 16 +++++++++++++++- .azure-pipelines/docker-sonic-vs/Dockerfile | 4 ++-- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/build-docker-sonic-vs-template.yml b/.azure-pipelines/build-docker-sonic-vs-template.yml index aa27bca9f..41de3b089 100644 --- a/.azure-pipelines/build-docker-sonic-vs-template.yml +++ b/.azure-pipelines/build-docker-sonic-vs-template.yml @@ -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 diff --git a/.azure-pipelines/build-swss-template.yml b/.azure-pipelines/build-swss-template.yml index 5bda87c25..af901ad14 100644 --- a/.azure-pipelines/build-swss-template.yml +++ b/.azure-pipelines/build-swss-template.yml @@ -110,8 +110,22 @@ 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 + displayName: "Download sonic-dash-api" - script: | set -ex diff --git a/.azure-pipelines/docker-sonic-vs/Dockerfile b/.azure-pipelines/docker-sonic-vs/Dockerfile index 8e4cbb8d9..3d2198050 100644 --- a/.azure-pipelines/docker-sonic-vs/Dockerfile +++ b/.azure-pipelines/docker-sonic-vs/Dockerfile @@ -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