From 64efa2c5619062da666b93a7f050e7ceeb640dcf Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 6 Sep 2022 14:17:47 -0700 Subject: [PATCH] update release tooling to use candidate channel --- .azure-pipelines/release.yml | 2 +- .azure-pipelines/templates/stages/deploy-stage.yml | 1 + tools/finish_release.py | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/release.yml b/.azure-pipelines/release.yml index 26639151f..9169dc950 100644 --- a/.azure-pipelines/release.yml +++ b/.azure-pipelines/release.yml @@ -15,5 +15,5 @@ stages: - template: templates/stages/changelog-stage.yml - template: templates/stages/deploy-stage.yml parameters: - snapReleaseChannel: beta + snapReleaseChannel: candidate - template: templates/stages/notify-failure-stage.yml diff --git a/.azure-pipelines/templates/stages/deploy-stage.yml b/.azure-pipelines/templates/stages/deploy-stage.yml index e60908134..15bb35079 100644 --- a/.azure-pipelines/templates/stages/deploy-stage.yml +++ b/.azure-pipelines/templates/stages/deploy-stage.yml @@ -5,6 +5,7 @@ parameters: values: - edge - beta + - candidate stages: - stage: Deploy diff --git a/tools/finish_release.py b/tools/finish_release.py index ec749d48f..18aa8ee30 100755 --- a/tools/finish_release.py +++ b/tools/finish_release.py @@ -4,7 +4,7 @@ Post-release script to publish artifacts created from Azure Pipelines. This currently includes: -* Moving snaps from the beta channel to the stable channel +* Moving snaps from the candidate channel to the stable channel * Publishing the Windows installer in a GitHub release Setup: @@ -110,7 +110,7 @@ def assert_logged_into_snapcraft(): def get_snap_revisions(snap, version): - """Finds the revisions for the snap and version in the beta channel. + """Finds the revisions for the snap and version in the candidate channel. If you call this function without being logged in with snapcraft, it will hang with no output. @@ -130,20 +130,20 @@ def get_snap_revisions(snap, version): print('Getting revision numbers for', snap, version) cmd = ['snapcraft', 'status', snap] process = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, universal_newlines=True) - pattern = f'^\s+beta\s+{version}\s+(\d+)\s*' + pattern = f'^\s+candidate\s+{version}\s+(\d+)\s*' revisions = re.findall(pattern, process.stdout, re.MULTILINE) assert len(revisions) == SNAP_ARCH_COUNT, f'Unexpected number of snaps found for {snap} {version} (expected {SNAP_ARCH_COUNT}, found {len(revisions)})' return revisions def promote_snaps(version): - """Promotes all Certbot snaps from the beta to stable channel. + """Promotes all Certbot snaps from the candidate to stable channel. If the snaps have already been released to the stable channel, this function will try to release them again which has no effect. :param str version: the version number that should be found in the - beta channel, e.g. 1.7.0 + candidate channel, e.g. 1.7.0 :raises SystemExit: if the command snapcraft is unavailable or it isn't logged into an account