Skip to content

Commit 872b5cb

Browse files
authored
[ci]: archive swss pytests (sonic-net#1690)
in other pipelines, they will download swss and pytests. this is make sure the swss.deb and pytests are matched. Signed-off-by: Guohan Lu <[email protected]>
1 parent 73cbd91 commit 872b5cb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.azure-pipelines/build-template.yml

+11
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ parameters:
3030
- name: artifact_name
3131
type: string
3232

33+
- name: archive_pytests
34+
type: boolean
35+
default: false
36+
3337
jobs:
3438
- job:
3539
displayName: ${{ parameters.arch }}
@@ -93,9 +97,16 @@ jobs:
9397
- checkout: self
9498
submodules: true
9599
- script: |
100+
set -x
101+
tar czf pytest.tgz tests
102+
cp -r pytest.tgz $(Build.ArtifactStagingDirectory)/
96103
./autogen.sh
97104
dpkg-buildpackage -us -uc -b -j$(nproc) && cp ../*.deb .
98105
displayName: "Compile sonic swss"
99106
- publish: $(System.DefaultWorkingDirectory)/
100107
artifact: ${{ parameters.artifact_name }}
101108
displayName: "Archive swss debian packages"
109+
- publish: $(Build.ArtifactStagingDirectory)/
110+
artifact: sonic-swss-pytests
111+
displayName: "Archive swss pytests"
112+
condition: eq('${{ parameters.archive_pytests }}', true)

azure-pipelines.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ stages:
1919
swss_common_artifact_name: sonic-swss-common
2020
sairedis_artifact_name: sonic-sairedis
2121
artifact_name: sonic-swss
22+
archive_pytests: true
2223

2324
- stage: BuildArm
2425
dependsOn: Build

0 commit comments

Comments
 (0)