diff --git a/.azure-pipelines/templates/jobs/packaging-jobs.yml b/.azure-pipelines/templates/jobs/packaging-jobs.yml index c8ab211af..6d651bdfa 100644 --- a/.azure-pipelines/templates/jobs/packaging-jobs.yml +++ b/.azure-pipelines/templates/jobs/packaging-jobs.yml @@ -59,14 +59,21 @@ jobs: venv\Scripts\python -m pytest certbot-ci\certbot_integration_tests\certbot_tests -n 4 displayName: Run certbot integration tests - job: snap_build + strategy: + matrix: + amd64: + ARCH: amd64 + i386: + ARCH: i386 + arm64: + ARCH: arm64 + armhf: + ARCH: armhf pool: vmImage: ubuntu-18.04 steps: - script: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends snap - sudo snap install --classic snapcraft - sudo snap install lxd + snap/local/build.sh ${ARCH} displayName: Install dependencies - script: | snap/local/build_and_install.sh @@ -75,7 +82,7 @@ jobs: - task: PublishPipelineArtifact@1 inputs: path: $(Build.ArtifactStagingDirectory) - artifact: snap + artifact: snap-$(arch) displayName: Publish Snap - job: snap_run dependsOn: snap_build @@ -91,11 +98,11 @@ jobs: displayName: Install dependencies - task: DownloadPipelineArtifact@2 inputs: - artifact: snap + artifact: snap-amd64 path: $(Build.SourcesDirectory)/snap displayName: Retrieve Certbot snap - script: | - sudo snap install --dangerous --classic snap/*.snap + sudo snap install --dangerous --classic snap-amd64/*.snap displayName: Install Certbot snap - script: | python -m tox diff --git a/snap/local/build_and_install.sh b/snap/local/build.sh old mode 100755 new mode 100644 similarity index 79% rename from snap/local/build_and_install.sh rename to snap/local/build.sh index 225bd54ec..ba28a30ec --- a/snap/local/build_and_install.sh +++ b/snap/local/build.sh @@ -5,11 +5,6 @@ # Usage: build_and_install.sh [amd64,arm64,armhf] set -ex -if [[ -z "$TRAVIS" && -z "$SYSTEM_TEAMFOUNDATIONSERVERURI" ]]; then - echo "This script makes global changes to the system it is run on so should only be run in CI." - exit 1 -fi - SNAP_ARCH=$1 if [[ -z "${SNAP_ARCH}" ]]; then @@ -47,7 +42,3 @@ docker run \ -e "PIP_EXTRA_INDEX_URL=http://localhost:8080" \ "adferrand/snapcraft:${DOCKER_ARCH}-stable" \ snapcraft - -if [[ "$(arch)" == "${QEMU_ARCH}" ]]; then - sudo snap install --dangerous --classic *.snap -fi