diff --git a/.azure-pipelines/release.yml b/.azure-pipelines/release.yml index 2374289e3..edef2d1c3 100644 --- a/.azure-pipelines/release.yml +++ b/.azure-pipelines/release.yml @@ -15,11 +15,5 @@ stages: - template: templates/stages/changelog-stage.yml - template: templates/stages/deploy-stage.yml parameters: - ${{ if startsWith(variables['Build.SourceBranchName'], 'v2') }}: - snapReleaseChannel: beta - ${{ elseif startsWith(variables['Build.SourceBranchName'], 'v1') }}: - snapReleaseChannel: candidate - ${{ else }}: - # This should never happen - snapReleaseChannel: somethingInvalid + snapReleaseChannel: beta - template: templates/stages/notify-failure-stage.yml diff --git a/.azure-pipelines/templates/jobs/snap-deploy-job.yml b/.azure-pipelines/templates/jobs/snap-deploy-job.yml index d1d709cb9..a3c68af36 100644 --- a/.azure-pipelines/templates/jobs/snap-deploy-job.yml +++ b/.azure-pipelines/templates/jobs/snap-deploy-job.yml @@ -12,14 +12,13 @@ parameters: values: - edge - beta - - candidate jobs: # This job relies on credentials used to publish the Certbot snaps. This # credential file was created by running: # # snapcraft logout - # snapcraft export-login --channels=candidate,beta,edge snapcraft.cfg + # snapcraft export-login --channels=beta,edge snapcraft.cfg # (provide the shared snapcraft credentials when prompted) # # Then the file was added as a secure file in Azure pipelines @@ -30,7 +29,7 @@ jobs: # https://docs.microsoft.com/en-us/azure/devops/pipelines/library/secure-files?view=azure-devops#q-how-do-i-authorize-a-secure-file-for-use-in-a-specific-pipeline. # # This file has a maximum lifetime of one year and the current file will - # expire on 2023-09-06. The file will need to be updated before then to + # expire on 2024-02-10. The file will need to be updated before then to # prevent automated deploys from breaking. # # Revoking these credentials can be done by changing the password of the diff --git a/certbot/docs/contributing.rst b/certbot/docs/contributing.rst index 49cc1fc81..f86bed01a 100644 --- a/certbot/docs/contributing.rst +++ b/certbot/docs/contributing.rst @@ -585,8 +585,8 @@ include our snaps, Docker images, Windows installer, CI, and our development environments. In most cases, the file where dependency versions are specified is -``tools/requirements.txt``. There are three exceptions to this. The first is -our "oldest" tests where ``tools/oldest_constraints.txt`` is used instead. The +``tools/requirements.txt``. There are two exceptions to this. The first is our +"oldest" tests where ``tools/oldest_constraints.txt`` is used instead. The purpose of the "oldest" tests is to ensure Certbot continues to work with the oldest versions of our dependencies which we claim to support. The oldest versions of the dependencies we support should also be declared in our setup.py @@ -598,12 +598,6 @@ leave Certbot's dependencies unpinned. The thinking behind this test is to help us learn about breaking changes in our dependencies so that we can respond accordingly. -The third exception is temporary and at ``tools/1.32.x/requirements.txt``. -This file is simply a copy of ``tools/requirements.txt`` from our 1.32.x branch -to help us ensure those dependencies stay reasonably well updated while we still -have Certbot 1.x snap users. Once we've moved all snap users to Certbot 2.0, -this file should be deleted. - The choices of whether Certbot's dependencies are pinned and what file is used if they are should be automatically handled for you most of the time by Certbot's tooling. The way it works though is ``tools/pip_install.py`` (which diff --git a/tools/1.32.x/requirements.txt b/tools/1.32.x/requirements.txt deleted file mode 100644 index 429eaf192..000000000 --- a/tools/1.32.x/requirements.txt +++ /dev/null @@ -1,194 +0,0 @@ -# This is a copy of tools/requirements.txt from the 1.32.x branch that I -# placed here so it will be in our master branch and GitHub will scan it for -# security vulnerabilities while we still have 1.x snap users. If we're notified -# about problems in our dependencies here and want to upgrade, we should do so -# by updating tools/requirements.txt on the 1.32.x branch, doing a point release -# from that branch, and copying any updates to tools/requirements.txt on that -# branch to this file on the master branch. -# -# This file is named requirements.txt so it is scanned by GitHub. See -# https://docs.github.com/en/github/visualizing-repository-data-with-graphs/about-the-dependency-graph#supported-package-ecosystems -# for more info. -alabaster==0.7.12 ; python_version >= "3.7" and python_version < "4.0" -apacheconfig==0.3.2 ; python_version >= "3.7" and python_version < "4.0" -appnope==0.1.3 ; python_version >= "3.7" and python_version < "4.0" and sys_platform == "darwin" -astroid==2.11.7 ; python_version >= "3.7" and python_version < "4.0" -attrs==22.1.0 ; python_version >= "3.7" and python_version < "4.0" -awscli==1.27.30 ; python_version >= "3.7" and python_version < "4.0" -azure-devops==6.0.0b4 ; python_version >= "3.7" and python_version < "4.0" -babel==2.11.0 ; python_version >= "3.7" and python_version < "4.0" -backcall==0.2.0 ; python_version >= "3.7" and python_version < "4.0" -backports-cached-property==1.0.2 ; python_version >= "3.7" and python_version < "3.8" -bcrypt==4.0.1 ; python_version >= "3.7" and python_version < "4.0" -beautifulsoup4==4.11.1 ; python_version >= "3.7" and python_version < "4.0" -bleach==5.0.1 ; python_version >= "3.7" and python_version < "4.0" -boto3==1.26.30 ; python_version >= "3.7" and python_version < "4.0" -botocore==1.29.30 ; python_version >= "3.7" and python_version < "4.0" -cachecontrol==0.12.11 ; python_version >= "3.7" and python_version < "4.0" -cachetools==5.2.0 ; python_version >= "3.7" and python_version < "4.0" -cachy==0.3.0 ; python_version >= "3.7" and python_version < "4.0" -certifi==2022.12.7 ; python_version >= "3.7" and python_version < "4" -cffi==1.15.1 ; python_version >= "3.7" and python_version < "4.0" -charset-normalizer==2.1.1 ; python_version >= "3.7" and python_version < "4" -cleo==1.0.0a5 ; python_version >= "3.7" and python_version < "4.0" -cloudflare==2.11.1 ; python_version >= "3.7" and python_version < "4.0" -colorama==0.4.4 ; python_version >= "3.7" and python_version < "4.0" -commonmark==0.9.1 ; python_version >= "3.7" and python_version < "4.0" -configargparse==1.5.3 ; python_version >= "3.7" and python_version < "4.0" -configobj==5.0.6 ; python_version >= "3.7" and python_version < "4.0" -coverage==6.5.0 ; python_version >= "3.7" and python_version < "4.0" -crashtest==0.3.1 ; python_version >= "3.7" and python_version < "4.0" -cryptography==38.0.4 ; python_version >= "3.7" and python_version < "4.0" -cython==0.29.32 ; python_version >= "3.7" and python_version < "4.0" -decorator==5.1.1 ; python_version >= "3.7" and python_version < "4.0" -dill==0.3.6 ; python_version >= "3.7" and python_version < "4.0" -distlib==0.3.6 ; python_version >= "3.7" and python_version < "4.0" -distro==1.8.0 ; python_version >= "3.7" and python_version < "4.0" -dns-lexicon==3.11.7 ; python_version >= "3.7" and python_version < "4.0" -dnspython==2.2.1 ; python_version >= "3.7" and python_version < "4.0" -docutils==0.16 ; python_version >= "3.7" and python_version < "4.0" -dulwich==0.20.50 ; python_version >= "3.7" and python_version < "4.0" -exceptiongroup==1.0.4 ; python_version >= "3.7" and python_version < "3.11" -execnet==1.9.0 ; python_version >= "3.7" and python_version < "4.0" -fabric==2.7.1 ; python_version >= "3.7" and python_version < "4.0" -filelock==3.8.2 ; python_version >= "3.7" and python_version < "4.0" -google-api-core==2.11.0 ; python_version >= "3.7" and python_version < "4.0" -google-api-python-client==2.70.0 ; python_version >= "3.7" and python_version < "4.0" -google-auth-httplib2==0.1.0 ; python_version >= "3.7" and python_version < "4.0" -google-auth==2.15.0 ; python_version >= "3.7" and python_version < "4.0" -googleapis-common-protos==1.57.0 ; python_version >= "3.7" and python_version < "4.0" -html5lib==1.1 ; python_version >= "3.7" and python_version < "4.0" -httplib2==0.21.0 ; python_version >= "3.7" and python_version < "4.0" -idna==3.4 ; python_version >= "3.7" and python_version < "4" -imagesize==1.4.1 ; python_version >= "3.7" and python_version < "4.0" -importlib-metadata==4.13.0 ; python_version >= "3.7" and python_version < "4.0" -importlib-resources==5.10.1 ; python_version >= "3.7" and python_version < "3.9" -iniconfig==1.1.1 ; python_version >= "3.7" and python_version < "4.0" -invoke==1.7.3 ; python_version >= "3.7" and python_version < "4.0" -ipdb==0.13.11 ; python_version >= "3.7" and python_version < "4.0" -ipython==7.34.0 ; python_version >= "3.7" and python_version < "4.0" -isodate==0.6.1 ; python_version >= "3.7" and python_version < "4.0" -isort==5.11.2 ; python_version >= "3.7" and python_version < "4.0" -jaraco-classes==3.2.3 ; python_version >= "3.7" and python_version < "4.0" -jedi==0.18.2 ; python_version >= "3.7" and python_version < "4.0" -jeepney==0.8.0 ; python_version >= "3.7" and python_version < "4.0" and sys_platform == "linux" -jinja2==3.1.2 ; python_version >= "3.7" and python_version < "4.0" -jmespath==1.0.1 ; python_version >= "3.7" and python_version < "4.0" -josepy==1.13.0 ; python_version >= "3.7" and python_version < "4.0" -jsonlines==3.1.0 ; python_version >= "3.7" and python_version < "4.0" -jsonpickle==2.2.0 ; python_version >= "3.7" and python_version < "4.0" -jsonschema==4.17.3 ; python_version >= "3.7" and python_version < "4.0" -keyring==23.11.0 ; python_version >= "3.7" and python_version < "4.0" -lazy-object-proxy==1.8.0 ; python_version >= "3.7" and python_version < "4.0" -lockfile==0.12.2 ; python_version >= "3.7" and python_version < "4.0" -markupsafe==2.1.1 ; python_version >= "3.7" and python_version < "4.0" -matplotlib-inline==0.1.6 ; python_version >= "3.7" and python_version < "4.0" -mccabe==0.7.0 ; python_version >= "3.7" and python_version < "4.0" -mock==4.0.3 ; python_version >= "3.7" and python_version < "4.0" -more-itertools==9.0.0 ; python_version >= "3.7" and python_version < "4.0" -msgpack==1.0.4 ; python_version >= "3.7" and python_version < "4.0" -msrest==0.6.21 ; python_version >= "3.7" and python_version < "4.0" -mypy-extensions==0.4.3 ; python_version >= "3.7" and python_version < "4.0" -mypy==0.982 ; python_version >= "3.7" and python_version < "4.0" -oauth2client==4.1.3 ; python_version >= "3.7" and python_version < "4.0" -oauthlib==3.2.2 ; python_version >= "3.7" and python_version < "4.0" -packaging==22.0 ; python_version >= "3.7" and python_version < "4.0" -paramiko==2.12.0 ; python_version >= "3.7" and python_version < "4.0" -parsedatetime==2.6 ; python_version >= "3.7" and python_version < "4.0" -parso==0.8.3 ; python_version >= "3.7" and python_version < "4.0" -pathlib2==2.3.7.post1 ; python_version >= "3.7" and python_version < "4.0" -pexpect==4.8.0 ; python_version >= "3.7" and python_version < "4.0" -pickleshare==0.7.5 ; python_version >= "3.7" and python_version < "4.0" -pip==22.3.1 ; python_version >= "3.7" and python_version < "4.0" -pkginfo==1.9.2 ; python_version >= "3.7" and python_version < "4.0" -pkgutil-resolve-name==1.3.10 ; python_version >= "3.7" and python_version < "3.9" -platformdirs==2.6.0 ; python_version >= "3.7" and python_version < "4.0" -pluggy==1.0.0 ; python_version >= "3.7" and python_version < "4.0" -ply==3.11 ; python_version >= "3.7" and python_version < "4.0" -poetry-core==1.3.2 ; python_version >= "3.7" and python_version < "4.0" -poetry-plugin-export==1.2.0 ; python_version >= "3.7" and python_version < "4.0" -poetry==1.2.2 ; python_version >= "3.7" and python_version < "4.0" -prompt-toolkit==3.0.36 ; python_version >= "3.7" and python_version < "4.0" -protobuf==4.21.12 ; python_version >= "3.7" and python_version < "4.0" -ptyprocess==0.7.0 ; python_version >= "3.7" and python_version < "4.0" -py==1.11.0 ; python_version >= "3.7" and python_version < "4.0" -pyasn1-modules==0.2.8 ; python_version >= "3.7" and python_version < "4.0" -pyasn1==0.4.8 ; python_version >= "3.7" and python_version < "4.0" -pycparser==2.21 ; python_version >= "3.7" and python_version < "4.0" -pygments==2.13.0 ; python_version >= "3.7" and python_version < "4.0" -pylev==1.4.0 ; python_version >= "3.7" and python_version < "4.0" -pylint==2.13.9 ; python_version >= "3.7" and python_version < "4.0" -pynacl==1.5.0 ; python_version >= "3.7" and python_version < "4.0" -pynsist==2.7 ; python_version >= "3.7" and python_version < "4.0" -pyopenssl==22.1.0 ; python_version >= "3.7" and python_version < "4.0" -pyparsing==3.0.9 ; python_version >= "3.7" and python_version < "4.0" -pyrfc3339==1.1 ; python_version >= "3.7" and python_version < "4.0" -pyrsistent==0.19.2 ; python_version >= "3.7" and python_version < "4.0" -pytest-cov==4.0.0 ; python_version >= "3.7" and python_version < "4.0" -pytest-xdist==3.1.0 ; python_version >= "3.7" and python_version < "4.0" -pytest==7.2.0 ; python_version >= "3.7" and python_version < "4.0" -python-augeas==1.1.0 ; python_version >= "3.7" and python_version < "4.0" -python-dateutil==2.8.2 ; python_version >= "3.7" and python_version < "4.0" -python-digitalocean==1.17.0 ; python_version >= "3.7" and python_version < "4.0" -pytz==2022.6 ; python_version >= "3.7" and python_version < "4.0" -pywin32-ctypes==0.2.0 ; python_version >= "3.7" and python_version < "4.0" and sys_platform == "win32" -pywin32==305 ; python_version >= "3.7" and python_version < "4.0" and sys_platform == "win32" -pyyaml==5.4.1 ; python_version >= "3.7" and python_version < "4.0" -readme-renderer==37.3 ; python_version >= "3.7" and python_version < "4.0" -requests-download==0.1.2 ; python_version >= "3.7" and python_version < "4.0" -requests-file==1.5.1 ; python_version >= "3.7" and python_version < "4.0" -requests-oauthlib==1.3.1 ; python_version >= "3.7" and python_version < "4.0" -requests-toolbelt==0.9.1 ; python_version >= "3.7" and python_version < "4.0" -requests==2.28.1 ; python_version >= "3.7" and python_version < "4" -rfc3986==2.0.0 ; python_version >= "3.7" and python_version < "4.0" -rich==12.6.0 ; python_version >= "3.7" and python_version < "4.0" -rsa==4.7.2 ; python_version >= "3.7" and python_version < "4" -s3transfer==0.6.0 ; python_version >= "3.7" and python_version < "4.0" -secretstorage==3.3.3 ; python_version >= "3.7" and python_version < "4.0" and sys_platform == "linux" -semantic-version==2.10.0 ; python_version >= "3.7" and python_version < "4.0" -setuptools-rust==1.5.2 ; python_version >= "3.7" and python_version < "4.0" -setuptools==65.6.3 ; python_version >= "3.7" and python_version < "4.0" -shellingham==1.5.0 ; python_version >= "3.7" and python_version < "4.0" -six==1.16.0 ; python_version >= "3.7" and python_version < "4.0" -snowballstemmer==2.2.0 ; python_version >= "3.7" and python_version < "4.0" -soupsieve==2.3.2.post1 ; python_version >= "3.7" and python_version < "4.0" -sphinx-rtd-theme==1.1.1 ; python_version >= "3.7" and python_version < "4.0" -sphinx==5.1.1 ; python_version >= "3.7" and python_version < "4.0" -sphinxcontrib-applehelp==1.0.2 ; python_version >= "3.7" and python_version < "4.0" -sphinxcontrib-devhelp==1.0.2 ; python_version >= "3.7" and python_version < "4.0" -sphinxcontrib-htmlhelp==2.0.0 ; python_version >= "3.7" and python_version < "4.0" -sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.7" and python_version < "4.0" -sphinxcontrib-qthelp==1.0.3 ; python_version >= "3.7" and python_version < "4.0" -sphinxcontrib-serializinghtml==1.1.5 ; python_version >= "3.7" and python_version < "4.0" -tldextract==3.4.0 ; python_version >= "3.7" and python_version < "4.0" -tomli==2.0.1 ; python_version >= "3.7" and python_full_version <= "3.11.0a6" -tomlkit==0.11.6 ; python_version >= "3.7" and python_version < "4.0" -tox==3.27.1 ; python_version >= "3.7" and python_version < "4.0" -traitlets==5.7.1 ; python_version >= "3.7" and python_version < "4.0" -twine==4.0.2 ; python_version >= "3.7" and python_version < "4.0" -typed-ast==1.5.4 ; python_version >= "3.7" and python_version < "3.8" -types-cryptography==3.3.23.2 ; python_version >= "3.7" and python_version < "4.0" -types-mock==4.0.15.2 ; python_version >= "3.7" and python_version < "4.0" -types-pyopenssl==22.1.0.2 ; python_version >= "3.7" and python_version < "4.0" -types-pyrfc3339==1.1.1.1 ; python_version >= "3.7" and python_version < "4.0" -types-python-dateutil==2.8.19.4 ; python_version >= "3.7" and python_version < "4.0" -types-pytz==2022.6.0.1 ; python_version >= "3.7" and python_version < "4.0" -types-requests==2.28.11.5 ; python_version >= "3.7" and python_version < "4.0" -types-setuptools==65.6.0.2 ; python_version >= "3.7" and python_version < "4.0" -types-six==1.16.21.4 ; python_version >= "3.7" and python_version < "4.0" -types-urllib3==1.26.25.4 ; python_version >= "3.7" and python_version < "4.0" -typing-extensions==4.4.0 ; python_version >= "3.7" and python_version < "4.0" -uritemplate==4.1.1 ; python_version >= "3.7" and python_version < "4.0" -urllib3==1.26.13 ; python_version >= "3.7" and python_version < "4.0" -virtualenv==20.17.1 ; python_version >= "3.7" and python_version < "4.0" -wcwidth==0.2.5 ; python_version >= "3.7" and python_version < "4.0" -webencodings==0.5.1 ; python_version >= "3.7" and python_version < "4.0" -wheel==0.38.4 ; python_version >= "3.7" and python_version < "4.0" -wrapt==1.14.1 ; python_version >= "3.7" and python_version < "4.0" -xattr==0.9.9 ; python_version >= "3.7" and python_version < "4.0" and sys_platform == "darwin" -yarg==0.1.9 ; python_version >= "3.7" and python_version < "4.0" -zipp==3.11.0 ; python_version >= "3.7" and python_version < "4.0" -zope-component==5.0.1 ; python_version >= "3.7" and python_version < "4.0" -zope-event==4.6 ; python_version >= "3.7" and python_version < "4.0" -zope-hookable==5.4 ; python_version >= "3.7" and python_version < "4.0" -zope-interface==5.5.2 ; python_version >= "3.7" and python_version < "4.0" diff --git a/tools/finish_release.py b/tools/finish_release.py index 88db47105..bf6a14d9f 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 candidate/beta channel to the stable channel +* Moving snaps from the beta channel to the stable channel * Publishing the Windows installer in a GitHub release Setup: @@ -40,16 +40,20 @@ import requests # Path to the root directory of the Certbot repository containing this script REPO_ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) -# This list contains the names of all Certbot DNS plugins -PLUGIN_SNAPS = [os.path.basename(path) for path in glob.glob(os.path.join(REPO_ROOT, 'certbot-dns-*'))] +# This list contains the names of all Certbot DNS plugins. We used to have a +# CloudXNS plugin and since it's possible devs still have that directory +# locally, we filter it out here. If it's included in this list, this script +# will crash later when it fails to find a CloudXNS snap on the snap store with +# the current version since we no longer build it. +PLUGIN_SNAPS = [os.path.basename(path) + for path in glob.glob(os.path.join(REPO_ROOT, 'certbot-dns-*')) + if not path.endswith('certbot-dns-cloudxns')] # This list contains the name of all Certbot snaps that should be published to # the stable channel. ALL_SNAPS = ['certbot'] + PLUGIN_SNAPS # This is the count of the architectures currently supported by our snaps used # for sanity checking. SNAP_ARCH_COUNT = 3 -# The percentage of users the 2.0 Certbot snap should be deployed to. -PROGRESSIVE_RELEASE_PERCENTAGE = 10 def parse_args(args): @@ -66,8 +70,7 @@ def parse_args(args): # Use the file's docstring for the help text and don't let argparse reformat it. parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) - parser.add_argument('--css', type=str, help='hostname of code signing server') - parser.add_argument('--progressive-only', action='store_true', help='only do a Certbot 2.0 progressive snap release') + parser.add_argument('--css', type=str, required=True, help='hostname of code signing server') return parser.parse_args(args) @@ -171,7 +174,7 @@ def promote_snaps(snaps, source_channel, version, progressive_percentage=None): print(e.stdout) raise -def fetch_version_number(major_version): +def fetch_version_number(major_version=None): """Retrieve version number for release from Azure Pipelines :param major_version: only consider releases for the specified major @@ -198,29 +201,14 @@ def main(args): parsed_args = parse_args(args) css = parsed_args.css - version = fetch_version_number('2' if parsed_args.progressive_only else None) + version = fetch_version_number() # Once the GitHub release has been published, trying to publish it # again fails. Publishing the snaps can be done multiple times though # so we do that first to make it easier to run the script again later # if something goes wrong. - # - # We only publish all snaps to the stable channel for 1.x releases. For 2.x - # releases, we only progressively release the base Certbot snap and update - # the Windows installer. Once we feel confident enough about Certbot 2.x, - # we should stop doing 1.x releases and unconditionally publish all snaps - # and the Windows installer. - if version.startswith('1.'): - promote_snaps(ALL_SNAPS, 'candidate', version) - elif not parsed_args.progressive_only and parsed_args.css is None: - # Fail fast if we weren't given a --css argument because we're going to - # need it later. - raise ValueError('Please provide the --css command line argument') - else: - promote_snaps(['certbot'], 'beta', version, - progressive_percentage=PROGRESSIVE_RELEASE_PERCENTAGE) - if not parsed_args.progressive_only: - publish_windows(css) + promote_snaps(ALL_SNAPS, 'beta', version) + publish_windows(css) if __name__ == "__main__": main(sys.argv[1:])