@@ -23,12 +23,6 @@ parameters:
2323- name : sonic_slave
2424 type : string
2525
26- - name : buildimage_artifact_name
27- type : string
28-
29- - name : buildimage_pipeline
30- type : number
31-
3226- name : sairedis_artifact_name
3327 type : string
3428
@@ -46,6 +40,9 @@ parameters:
4640 type : boolean
4741 default : false
4842
43+ - name : common_lib_artifact_name
44+ type : string
45+
4946jobs :
5047- job :
5148 displayName : ${{ parameters.arch }}
@@ -79,77 +76,63 @@ jobs:
7976 inputs :
8077 source : specific
8178 project : build
82- pipeline : 9
79+ pipeline : Azure.sonic-swss-common
8380 artifact : ${{ parameters.swss_common_artifact_name }}
8481 runVersion : ' latestFromBranch'
8582 runBranch : ' refs/heads/$(BUILD_BRANCH)'
86- path : ' $(Build.SourcesDirectory)/${{ parameters.swss_common_artifact_name }}'
83+ path : $(Build.ArtifactStagingDirectory)/download
84+ patterns : |
85+ libswsscommon_1.0.0_${{ parameters.arch }}.deb
86+ libswsscommon-dev_1.0.0_${{ parameters.arch }}.deb
8787 displayName : " Download sonic swss common deb packages"
8888 - task : DownloadPipelineArtifact@2
8989 inputs :
9090 source : specific
9191 project : build
92- pipeline : 12
92+ pipeline : Azure.sonic-sairedis
9393 artifact : ${{ parameters.sairedis_artifact_name }}
9494 runVersion : ' latestFromBranch'
9595 runBranch : ' refs/heads/$(BUILD_BRANCH)'
96- path : ' $(Build.SourcesDirectory)/${{ parameters.sairedis_artifact_name }}'
96+ path : $(Build.ArtifactStagingDirectory)/download
97+ patterns : |
98+ libsaivs_*.deb
99+ libsaivs-dev_*.deb
100+ libsairedis_*.deb
101+ libsairedis-dev_*.deb
102+ libsaimetadata_*.deb
103+ libsaimetadata-dev_*.deb
104+ syncd-vs_*.deb
97105 displayName : " Download sonic sairedis deb packages"
98106 - task : DownloadPipelineArtifact@2
99- ${{ if eq(parameters.buildimage_pipeline, 141) }} :
100- continueOnError : True
101107 inputs :
102108 source : specific
103109 project : build
104- pipeline : ${{ parameters.buildimage_pipeline }}
105- artifact : ${{ parameters.buildimage_artifact_name }}
110+ pipeline : Azure.sonic-buildimage.common_libs
111+ artifact : ${{ parameters.common_lib_artifact_name }}
106112 runVersion : ' latestFromBranch'
107113 runBranch : ' refs/heads/$(BUILD_BRANCH)'
108- path : ' $(Build.SourcesDirectory)/${{ parameters.buildimage_artifact_name }}'
109- displayName : " Download sonic buildimage deb packages"
110- - script : |
111- buildimage_artifact_downloaded=n
112- [ -d "$(Build.SourcesDirectory)/${{ parameters.buildimage_artifact_name }}/target" ] && buildimage_artifact_downloaded=y
113- echo "buildimage_artifact_downloaded=$buildimage_artifact_downloaded"
114- echo "##vso[task.setvariable variable=buildimage_artifact_downloaded]$buildimage_artifact_downloaded"
115- condition: eq(${{ parameters.buildimage_pipeline }}, 141)
116- displayName: "Check if sonic buildimage deb packages downloaded"
117- - task : DownloadPipelineArtifact@2
118- condition : and(eq(variables.buildimage_artifact_downloaded, 'n'), eq(${{ parameters.buildimage_pipeline }}, 141))
119- inputs :
120- source : specific
121- project : build
122- pipeline : ${{ parameters.buildimage_pipeline }}
123- artifact : ' sonic-buildimage.marvell-armhf1'
124- runVersion : specific
125- runId : 80637
126- path : ' $(Build.SourcesDirectory)/${{ parameters.buildimage_artifact_name }}'
127- displayName : " Download sonic buildimage deb packages from 80637"
114+ path : $(Build.ArtifactStagingDirectory)/download
115+ patterns : |
116+ target/debs/buster/libnl-3-200_*.deb
117+ target/debs/buster/libnl-3-dev_*.deb
118+ target/debs/buster/libnl-genl-3-200_*.deb
119+ target/debs/buster/libnl-genl-3-dev_*.deb
120+ target/debs/buster/libnl-route-3-200_*.deb
121+ target/debs/buster/libnl-route-3-dev_*.deb
122+ target/debs/buster/libnl-nf-3-200_*.deb
123+ target/debs/buster/libnl-nf-3-dev_*.deb
124+ displayName : " Download common libs"
128125 - script : |
129- cd $(Build.SourcesDirectory)/${{ parameters.buildimage_artifact_name }}
130- sudo dpkg -i target/debs/buster/libnl-3-200_*.deb
131- sudo dpkg -i target/debs/buster/libnl-3-dev_*.deb
132- sudo dpkg -i target/debs/buster/libnl-genl-3-200_*.deb
133- sudo dpkg -i target/debs/buster/libnl-genl-3-dev_*.deb
134- sudo dpkg -i target/debs/buster/libnl-route-3-200_*.deb
135- sudo dpkg -i target/debs/buster/libnl-route-3-dev_*.deb
136- sudo dpkg -i target/debs/buster/libnl-nf-3-200_*.deb
137- sudo dpkg -i target/debs/buster/libnl-nf-3-dev_*.deb
138- cd $(Build.SourcesDirectory)/${{ parameters.swss_common_artifact_name }}
139- sudo dpkg -i libswsscommon_1.0.0_${{ parameters.arch }}.deb
140- sudo dpkg -i libswsscommon-dev_1.0.0_${{ parameters.arch }}.deb
141- cd $(Build.SourcesDirectory)/${{ parameters.sairedis_artifact_name }}
142- sudo dpkg -i libsaivs_*.deb
143- sudo dpkg -i libsaivs-dev_*.deb
144- sudo dpkg -i libsairedis_*.deb
145- sudo dpkg -i libsairedis-dev_*.deb
146- sudo dpkg -i libsaimetadata_*.deb
147- sudo dpkg -i libsaimetadata-dev_*.deb
148- sudo dpkg -i syncd-vs_*.deb
149- workingDirectory: $(Pipeline.Workspace)
126+ set -ex
127+ cd download
128+ sudo dpkg -i $(find target/debs/buster -type f)
129+ sudo dpkg -i $(ls *.deb)
130+ cd ..
131+ rm -rf download
132+ workingDirectory: $(Build.ArtifactStagingDirectory)
150133 displayName: "Install libnl3, sonic swss common and sairedis"
151134 - script : |
152- set -x
135+ set -ex
153136 tar czf pytest.tgz tests
154137 cp -r pytest.tgz $(Build.ArtifactStagingDirectory)/
155138 if [ '${{ parameters.archive_gcov }}' == True ]; then
0 commit comments