diff --git a/.azure-pipelines/advanced-test.yml b/.azure-pipelines/advanced-test.yml index 012292ef2..109f31ac2 100644 --- a/.azure-pipelines/advanced-test.yml +++ b/.azure-pipelines/advanced-test.yml @@ -6,9 +6,5 @@ trigger: - test-* pr: none -jobs: - # Any addition here should be reflected in the advanced and release pipelines. - # It is advised to declare all jobs here as templates to improve maintainability. - - template: templates/jobs/standard-tests-jobs.yml - - template: templates/jobs/extended-tests-jobs.yml - - template: templates/jobs/packaging-jobs.yml +stages: + - template: templates/stages/test-and-package-stage.yml diff --git a/.azure-pipelines/advanced.yml b/.azure-pipelines/advanced.yml index 5ee31d55d..12b290120 100644 --- a/.azure-pipelines/advanced.yml +++ b/.azure-pipelines/advanced.yml @@ -12,14 +12,6 @@ schedules: always: true stages: - - stage: Test_Package - jobs: - # Any addition here should be reflected in the advanced-test and release pipelines. - # It is advised to declare all jobs here as templates to improve maintainability. - - template: templates/jobs/standard-tests-jobs.yml - - template: templates/jobs/extended-tests-jobs.yml - - template: templates/jobs/packaging-jobs.yml - - stage: Deploy - jobs: - - template: templates/jobs/deployment-jobs.yml + - template: templates/stages/test-and-package-stage.yml + - template: templates/stages/deploy-stage.yml - template: templates/stages/notify-failure-stage.yml diff --git a/.azure-pipelines/release.yml b/.azure-pipelines/release.yml index ada93f266..8520d5f49 100644 --- a/.azure-pipelines/release.yml +++ b/.azure-pipelines/release.yml @@ -6,15 +6,7 @@ trigger: pr: none stages: - - stage: Test_Package - jobs: - # Any addition here should be reflected in the advanced and advanced-test pipelines. - # It is advised to declare all jobs here as templates to improve maintainability. - - template: templates/jobs/standard-tests-jobs.yml - - template: templates/jobs/extended-tests-jobs.yml - - template: templates/jobs/packaging-jobs.yml - - template: templates/jobs/changelog-jobs.yml - - stage: Deploy - jobs: - - template: templates/jobs/deployment-jobs.yml + - template: templates/stages/test-and-package-stage.yml + - template: templates/stages/changelog-stage.yml + - template: templates/stages/deploy-stage.yml - template: templates/stages/notify-failure-stage.yml diff --git a/.azure-pipelines/templates/jobs/changelog-jobs.yml b/.azure-pipelines/templates/jobs/changelog-jobs.yml deleted file mode 100644 index 4a65e2c2b..000000000 --- a/.azure-pipelines/templates/jobs/changelog-jobs.yml +++ /dev/null @@ -1,14 +0,0 @@ -jobs: - - job: changelog - pool: - vmImage: vs2017-win2016 - steps: - - bash: | - CERTBOT_VERSION="$(cd certbot && python -c "import certbot; print(certbot.__version__)" && cd ~-)" - "${BUILD_REPOSITORY_LOCALPATH}\tools\extract_changelog.py" "${CERTBOT_VERSION}" >> "${BUILD_ARTIFACTSTAGINGDIRECTORY}/release_notes.md" - displayName: Prepare changelog - - task: PublishPipelineArtifact@1 - inputs: - path: $(Build.ArtifactStagingDirectory) - artifact: changelog - displayName: Publish changelog diff --git a/.azure-pipelines/templates/jobs/deployment-jobs.yml b/.azure-pipelines/templates/jobs/deployment-jobs.yml deleted file mode 100644 index 69148a3dc..000000000 --- a/.azure-pipelines/templates/jobs/deployment-jobs.yml +++ /dev/null @@ -1,34 +0,0 @@ -jobs: - - job: publish_snap - strategy: - matrix: - amd64: - ARCH: amd64 - arm64: - ARCH: arm64 - armhf: - ARCH: armhf - pool: - vmImage: ubuntu-18.04 - variables: - - group: certbot-common - steps: - - bash: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends snap - sudo snap install --classic snapcraft - displayName: Install dependencies - - task: DownloadPipelineArtifact@2 - inputs: - artifact: snap-$(arch) - path: $(Build.SourcesDirectory)/snap - displayName: Retrieve Certbot snap - - task: DownloadSecureFile@1 - name: snapcraftCfg - inputs: - secureFile: snapcraft.cfg - - bash: | - mkdir -p .snapcraft - ln -s $(snapcraftCfg.secureFilePath) .snapcraft/snapcraft.cfg - snapcraft push --release=edge snap/*.snap - displayName: Publish to Snap store diff --git a/.azure-pipelines/templates/stages/changelog-stage.yml b/.azure-pipelines/templates/stages/changelog-stage.yml new file mode 100644 index 000000000..ca4cad47b --- /dev/null +++ b/.azure-pipelines/templates/stages/changelog-stage.yml @@ -0,0 +1,16 @@ +stages: + - stage: Changelog + jobs: + - job: prepare + pool: + vmImage: vs2017-win2016 + steps: + - bash: | + CERTBOT_VERSION="$(cd certbot && python -c "import certbot; print(certbot.__version__)" && cd ~-)" + "${BUILD_REPOSITORY_LOCALPATH}\tools\extract_changelog.py" "${CERTBOT_VERSION}" >> "${BUILD_ARTIFACTSTAGINGDIRECTORY}/release_notes.md" + displayName: Prepare changelog + - task: PublishPipelineArtifact@1 + inputs: + path: $(Build.ArtifactStagingDirectory) + artifact: changelog + displayName: Publish changelog diff --git a/.azure-pipelines/templates/stages/deploy-stage.yml b/.azure-pipelines/templates/stages/deploy-stage.yml new file mode 100644 index 000000000..8e78b5e52 --- /dev/null +++ b/.azure-pipelines/templates/stages/deploy-stage.yml @@ -0,0 +1,36 @@ +stages: + - stage: Deploy + jobs: + - job: publish_snap + strategy: + matrix: + amd64: + ARCH: amd64 + arm64: + ARCH: arm64 + armhf: + ARCH: armhf + pool: + vmImage: ubuntu-18.04 + variables: + - group: certbot-common + steps: + - bash: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends snap + sudo snap install --classic snapcraft + displayName: Install dependencies + - task: DownloadPipelineArtifact@2 + inputs: + artifact: snap-$(arch) + path: $(Build.SourcesDirectory)/snap + displayName: Retrieve Certbot snap + - task: DownloadSecureFile@1 + name: snapcraftCfg + inputs: + secureFile: snapcraft.cfg + - bash: | + mkdir -p .snapcraft + ln -s $(snapcraftCfg.secureFilePath) .snapcraft/snapcraft.cfg + snapcraft push --release=edge snap/*.snap + displayName: Publish to Snap store diff --git a/.azure-pipelines/templates/stages/test-and-package-stage.yml b/.azure-pipelines/templates/stages/test-and-package-stage.yml new file mode 100644 index 000000000..b46a6d679 --- /dev/null +++ b/.azure-pipelines/templates/stages/test-and-package-stage.yml @@ -0,0 +1,6 @@ +stages: + - stage: TestAndPackage + jobs: + - template: templates/jobs/standard-tests-jobs.yml + - template: templates/jobs/extended-tests-jobs.yml + - template: templates/jobs/packaging-jobs.yml