From 2e99a2139a6a3e8f4e150db4f026821aebdcd35b Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Fri, 17 Jul 2020 20:47:36 +0200 Subject: [PATCH] Trigger only amd64 builds for test branches --- .azure-pipelines/templates/jobs/packaging-jobs.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/jobs/packaging-jobs.yml b/.azure-pipelines/templates/jobs/packaging-jobs.yml index d6be05f0b..838b654a8 100644 --- a/.azure-pipelines/templates/jobs/packaging-jobs.yml +++ b/.azure-pipelines/templates/jobs/packaging-jobs.yml @@ -62,6 +62,12 @@ jobs: pool: vmImage: ubuntu-18.04 timeoutInMinutes: 0 + variables: + # Do not run the heavy non-amd64 builds for test branches + ${{ if not(startsWith(variables['Build.SourceBranchName'], 'test-')) }}: + ARCHS: amd64 arm64 armhf + ${{ if startsWith(variables['Build.SourceBranchName'], 'test-') }}: + ARCHS: amd64 steps: - script: | sudo apt-get update @@ -81,7 +87,7 @@ jobs: git config --global user.name "$(Build.RequestedFor)" mkdir -p ~/.local/share/snapcraft/provider/launchpad cp $(credentials.secureFilePath) ~/.local/share/snapcraft/provider/launchpad/credentials - python3 tools/snap/build_remote.py ALL --archs amd64 arm64 armhf + python3 tools/snap/build_remote.py ALL --archs ${ARCHS} displayName: Build snaps - script: | mv *.snap $(Build.ArtifactStagingDirectory)