diff --git a/.azure-pipelines/build-template.yml b/.azure-pipelines/build-template.yml index 7cc6350e2f9f..ea5d41e36fb6 100644 --- a/.azure-pipelines/build-template.yml +++ b/.azure-pipelines/build-template.yml @@ -30,6 +30,10 @@ parameters: - name: artifact_name type: string +- name: archive_pytests + type: boolean + default: false + jobs: - job: displayName: ${{ parameters.arch }} @@ -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) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4f2762d34839..5f34d4b045b5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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