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)