mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 08:12:15 -04:00
add 2.0 release logic
This commit is contained in:
parent
21ef8e4332
commit
38298c9145
4 changed files with 14 additions and 34 deletions
|
|
@ -1,18 +0,0 @@
|
|||
# Pipeline for testing, building, and deploying Certbot 2.0 pre-releases.
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
variables:
|
||||
# We don't publish our Docker images in this pipeline, but when building them
|
||||
# for testing, let's use the nightly tag.
|
||||
dockerTag: nightly
|
||||
snapBuildTimeout: 5400
|
||||
|
||||
stages:
|
||||
- template: templates/stages/test-and-package-stage.yml
|
||||
- stage: DeploySnaps
|
||||
jobs:
|
||||
- template: templates/jobs/snap-deploy-job.yml
|
||||
parameters:
|
||||
snapReleaseChannel: beta
|
||||
- template: templates/stages/notify-failure-stage.yml
|
||||
|
|
@ -15,5 +15,11 @@ stages:
|
|||
- template: templates/stages/changelog-stage.yml
|
||||
- template: templates/stages/deploy-stage.yml
|
||||
parameters:
|
||||
snapReleaseChannel: candidate
|
||||
${{ if startsWith(variables['Build.SourceBranchName'], 'v2') }}:
|
||||
snapReleaseChannel: beta
|
||||
${{ elseif startsWith(variables['Build.SourceBranchName'], 'v1') }}:
|
||||
snapReleaseChannel: candidate
|
||||
${{ else }}:
|
||||
# This should never happen
|
||||
snapReleaseChannel: somethingInvalid
|
||||
- template: templates/stages/notify-failure-stage.yml
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ ParseRequestedArch "${2}"
|
|||
|
||||
# Creates and pushes all Docker images aliases for the requested architectures
|
||||
# set in the environment variable ALL_REQUESTED_ARCH. If the value of the
|
||||
# global variable TAG_BASE is a version tag such as v0.35.0, the "latest" tag
|
||||
# is also updated. Tags without the architecture part are also created for the
|
||||
# default architecture.
|
||||
# global variable TAG_BASE is a 2.0.0 or greater version tag such as v2.1.0,
|
||||
# the "latest" tag is also updated. Tags without the architecture part are also
|
||||
# created for the default architecture.
|
||||
# As an example, for amd64 (the default architecture) and the tag v0.35.0, the
|
||||
# following tags would be created:
|
||||
# - certbot/certbot:v0.35.0
|
||||
|
|
@ -52,7 +52,8 @@ TagAndPushForAllRequestedArch() {
|
|||
# another timeout & can get the deubg logs, we're leaving them in.
|
||||
docker --debug push "${DOCKER_REPO}:${TARGET_ARCH}-${TAG_BASE}"
|
||||
|
||||
if [[ "${TAG_BASE}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
# If TAG_BASE is a valid tag for version 2.0.0 or greater
|
||||
if [[ "${TAG_BASE}" =~ ^v([2-9]|[1-9][0-9]+)\.[0-9]+\.[0-9]+$ ]]; then
|
||||
docker tag "${DOCKER_REPO}:${TARGET_ARCH}-${TAG_BASE}" "${DOCKER_REPO}:${TARGET_ARCH}-latest"
|
||||
docker --debug push "${DOCKER_REPO}:${TARGET_ARCH}-latest"
|
||||
if [ "${TARGET_ARCH}" == "${DEFAULT_ARCH}" ]; then
|
||||
|
|
|
|||
|
|
@ -65,15 +65,6 @@ def parse_args(args):
|
|||
parser = argparse.ArgumentParser(description=__doc__,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||
parser.add_argument('--css', type=str, required=True, help='hostname of code signing server')
|
||||
group = parser.add_mutually_exclusive_group()
|
||||
# We use 'store_false' and a destination related to the other type of
|
||||
# artifact to cause the flag being set to disable publishing of the other
|
||||
# artifact. This makes using the parsed arguments later on a little simpler
|
||||
# and cleaner.
|
||||
group.add_argument('--snaps-only', action='store_false', dest='publish_windows',
|
||||
help='Skip publishing other artifacts and only publish the snaps')
|
||||
group.add_argument('--windows-only', action='store_false', dest='publish_snaps',
|
||||
help='Skip publishing other artifacts and only publish the Windows installer')
|
||||
return parser.parse_args(args)
|
||||
|
||||
|
||||
|
|
@ -195,9 +186,9 @@ def main(args):
|
|||
# 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.
|
||||
if parsed_args.publish_snaps:
|
||||
if version.startswith('1.')
|
||||
promote_snaps(version)
|
||||
if parsed_args.publish_windows:
|
||||
else:
|
||||
publish_windows(css)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Reference in a new issue