Skip to content

Commit

Permalink
[ci]: archive swss pytests (#1690)
Browse files Browse the repository at this point in the history
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 <lguohan@gmail.com>
  • Loading branch information
lguohan authored Apr 3, 2021
1 parent 73cbd91 commit 872b5cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ parameters:
- name: artifact_name
type: string

- name: archive_pytests
type: boolean
default: false

jobs:
- job:
displayName: ${{ parameters.arch }}
Expand Down Expand Up @@ -93,9 +97,16 @@ jobs:
- checkout: self
submodules: true
- script: |
set -x
tar czf pytest.tgz tests
cp -r pytest.tgz $(Build.ArtifactStagingDirectory)/
./autogen.sh
dpkg-buildpackage -us -uc -b -j$(nproc) && cp ../*.deb .
displayName: "Compile sonic swss"
- publish: $(System.DefaultWorkingDirectory)/
artifact: ${{ parameters.artifact_name }}
displayName: "Archive swss debian packages"
- publish: $(Build.ArtifactStagingDirectory)/
artifact: sonic-swss-pytests
displayName: "Archive swss pytests"
condition: eq('${{ parameters.archive_pytests }}', true)
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ stages:
swss_common_artifact_name: sonic-swss-common
sairedis_artifact_name: sonic-sairedis
artifact_name: sonic-swss
archive_pytests: true

- stage: BuildArm
dependsOn: Build
Expand Down

0 comments on commit 872b5cb

Please sign in to comment.