Merge "Add stable-branch-mode:none option"
This commit is contained in:
commit
9183719ceb
@ -408,6 +408,11 @@ The top level of a deliverable file is a mapping with keys:
|
||||
Stable branch names track upstream release names, rather than
|
||||
OpenStack series names.
|
||||
|
||||
``none``
|
||||
This mode indicates that the deliverable should never have stable
|
||||
branches. This is used for specific deliverables like tempest
|
||||
or patrole.
|
||||
|
||||
``cycle-highlights``
|
||||
A list of plain-text bullet points describing some of the top new
|
||||
features or changes you would like to point out for this release
|
||||
|
@ -1437,6 +1437,11 @@ def validate_stable_branches(deliv, context):
|
||||
|
||||
branch_mode = deliv.stable_branch_type
|
||||
|
||||
if branch_mode == 'none' and deliv.branches:
|
||||
context.error('Deliverables with stable-branch-mode:none '
|
||||
'do not support stable branching.')
|
||||
return
|
||||
|
||||
if deliv.releases and deliv.releases[-1].is_eol:
|
||||
print('rule does not apply to end-of-life repos, skipping')
|
||||
return
|
||||
|
@ -57,7 +57,7 @@ properties:
|
||||
"manila-image-elements", "generic" ]
|
||||
stable-branch-type:
|
||||
type: "string"
|
||||
enum: [ "std", "tagless", "upstream" ]
|
||||
enum: [ "std", "tagless", "upstream", "none" ]
|
||||
cycle-highlights:
|
||||
type: "array"
|
||||
items:
|
||||
|
@ -2264,6 +2264,32 @@ class TestValidateStableBranches(base.BaseTestCase):
|
||||
self.assertEqual(0, len(self.ctx.warnings))
|
||||
self.assertEqual(1, len(self.ctx.errors))
|
||||
|
||||
def test_none_stable_branch_type(self):
|
||||
deliverable_data = textwrap.dedent('''
|
||||
type: other
|
||||
stable-branch-type: none
|
||||
releases:
|
||||
- version: 99.0.3
|
||||
projects:
|
||||
- repo: openstack/release-test
|
||||
hash: 0cd17d1ee3b9284d36b2a0d370b49a6f0bbb9660
|
||||
branches:
|
||||
- name: stable/ocata
|
||||
location:
|
||||
openstack/release-test: 99.0.3
|
||||
repository-settings:
|
||||
openstack/release-test: {}
|
||||
''')
|
||||
deliv = deliverable.Deliverable(
|
||||
team='team',
|
||||
series='ocata',
|
||||
name='release-test',
|
||||
data=yamlutils.loads(deliverable_data),
|
||||
)
|
||||
validate.validate_stable_branches(deliv, self.ctx)
|
||||
self.assertEqual(0, len(self.ctx.warnings))
|
||||
self.assertEqual(1, len(self.ctx.errors))
|
||||
|
||||
|
||||
class TestValidateFeatureBranches(base.BaseTestCase):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user