From 43e54e568ede1963be89a172ad1a15cf0375ba8d Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Mon, 10 Jan 2022 20:08:43 +0800 Subject: [PATCH] Fix armhf buildimage artifacts not found issue (#2107) The armhf sonic-buildimage build is not ready yet, it provides a workaround to download the depended packaged from the failed build 63911. The armhf build only depends on some of the debian packages of sonic-buildimage, target/debs/buster/libnl-*.deb, although the build 63911 was failed, but the depended packages were good. The build 63911 is retained, see https://dev.azure.com/mssonic/build/_build/results?buildId=63911&view=results --- .azure-pipelines/build-template.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.azure-pipelines/build-template.yml b/.azure-pipelines/build-template.yml index d351d5703a84..e75ffdad8d74 100644 --- a/.azure-pipelines/build-template.yml +++ b/.azure-pipelines/build-template.yml @@ -96,6 +96,8 @@ jobs: path: '$(Build.SourcesDirectory)/${{ parameters.sairedis_artifact_name }}' displayName: "Download sonic sairedis deb packages" - task: DownloadPipelineArtifact@2 + ${{ if eq(parameters.buildimage_pipeline, 141) }}: + continueOnError: True inputs: source: specific project: build @@ -105,6 +107,24 @@ jobs: runBranch: 'refs/heads/master' path: '$(Build.SourcesDirectory)/${{ parameters.buildimage_artifact_name }}' displayName: "Download sonic buildimage deb packages" + - script: | + buildimage_artifact_downloaded=n + [ -d "$(Build.SourcesDirectory)/${{ parameters.buildimage_artifact_name }}/target" ] && buildimage_artifact_downloaded=y + echo "buildimage_artifact_downloaded=$buildimage_artifact_downloaded" + echo "##vso[task.setvariable variable=buildimage_artifact_downloaded]$buildimage_artifact_downloaded" + condition: eq(${{ parameters.buildimage_pipeline }}, 141) + displayName: "Check if sonic buildimage deb packages downloaded" + - task: DownloadPipelineArtifact@2 + condition: and(eq(variables.buildimage_artifact_downloaded, 'n'), eq(${{ parameters.buildimage_pipeline }}, 141)) + inputs: + source: specific + project: build + pipeline: ${{ parameters.buildimage_pipeline }} + artifact: 'sonic-buildimage.marvell-armhf1' + runVersion: specific + runId: 63911 + path: '$(Build.SourcesDirectory)/${{ parameters.buildimage_artifact_name }}' + displayName: "Download sonic buildimage deb packages from 63911" - script: | cd $(Build.SourcesDirectory)/${{ parameters.buildimage_artifact_name }} sudo dpkg -i target/debs/buster/libnl-3-200_*.deb