From 573194a62376aac79c9b58a4d94cb82f20704f02 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 21 Aug 2017 15:51:41 -0400 Subject: [PATCH] add "upstream" stable-branch-type Add a stable-branch-type called "upstream" for projects that follow the naming conventions of another upstream project (see puppet-ceph for an example). Change-Id: I354bf975311c2b02c020dc83590c041c7733b041 Signed-off-by: Doug Hellmann --- README.rst | 4 ++++ openstack_releases/cmds/validate.py | 13 ++++++++++++- openstack_releases/schema.yaml | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 204c416ea9..9dee4533bf 100644 --- a/README.rst +++ b/README.rst @@ -432,6 +432,10 @@ The top level of a deliverable file is a mapping with keys: hash. This mode should only be used for projects that do not tag releases, such as devstack and grenade. + ``upstream`` + Stable branch names track upstream release names, rather than + OpenStack series names. + ``branches`` A list of the branches for the deliverable. diff --git a/openstack_releases/cmds/validate.py b/openstack_releases/cmds/validate.py index f51df954fb..683aebb3fa 100644 --- a/openstack_releases/cmds/validate.py +++ b/openstack_releases/cmds/validate.py @@ -681,11 +681,22 @@ def validate_stable_branches(deliverable_info, workdir, 'does not exist' % ( (loc, repo, branch['name']))) ) + elif branch_mode == 'upstream': + if not isinstance(location, six.string_types): + mk_error( + ('branch location for %s is ' + 'expected to be a string but got a %s' % ( + branch['name'], type(location))) + ) else: mk_error( ('unrecognized stable-branch-type %r' % (branch_mode,)) ) - if series_name == '_independent': + if branch_mode == 'upstream': + mk_warning( + 'skipping branch name check for upstream mode' + ) + elif series_name == '_independent': if series not in known_series: mk_error( ('stable branches must be named for known series ' diff --git a/openstack_releases/schema.yaml b/openstack_releases/schema.yaml index 0613536c02..4005a65b4c 100644 --- a/openstack_releases/schema.yaml +++ b/openstack_releases/schema.yaml @@ -38,7 +38,7 @@ properties: enum: [ "std", "xstatic", "fuel" ] stable-branch-type: type: "string" - enum: [ "std", "tagless" ] + enum: [ "std", "tagless", "upstream" ] releases: type: "array" items: