From 872b5cb9a2a398a086f4646fe134c199919b6c92 Mon Sep 17 00:00:00 2001 From: lguohan Date: Sat, 3 Apr 2021 12:08:37 -0700 Subject: [PATCH] [ci]: archive swss pytests (#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 --- .azure-pipelines/build-template.yml | 11 +++++++++++ azure-pipelines.yml | 1 + 2 files changed, 12 insertions(+) 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