Merge "Update tooling to support cycle-with-rc model"

This commit is contained in:
Zuul 2018-10-24 15:29:31 +00:00 committed by Gerrit Code Review
commit 09e2a39b46
5 changed files with 15 additions and 24 deletions

View File

@ -72,7 +72,7 @@ def main():
model = parser.add_mutually_exclusive_group()
model.add_argument(
'--model',
help=('the release model, such as "cycle-with-milestones"'
help=('the release model, such as "cycle-with-rc"'
' or "independent"'),
choices=sorted(deliverable_schema.release_models + ['independent']),
)
@ -113,17 +113,11 @@ def main():
action='store_true',
help='limit the list to deliverables not released in the cycle',
)
grp.add_argument(
'--missing-milestone',
help=('deliverables that do not have the specified milestone as '
'the most current release; for example 2 would look for .0b2 '
'in the version number (implies --model cycle-with-milestones)'),
)
grp.add_argument(
'--missing-rc',
action='store_true',
help=('deliverables that do not have a release candidate, yet '
'(implies --model cycle-with-milestones)'),
'(implies --model cycle-with-rc)'),
)
grp.add_argument(
'--missing-final',
@ -140,11 +134,8 @@ def main():
series = args.series
if args.missing_milestone:
model = 'cycle-with-milestones'
version_ending = '.0b{}'.format(args.missing_milestone)
elif args.missing_rc:
model = 'cycle-with-milestones'
if args.missing_rc:
model = 'cycle-with-rc'
version_ending = None
elif args.missing_final:
model = args.model

View File

@ -27,7 +27,7 @@ from openstack_releases import series_status
from openstack_releases import yamlutils
# Release models that support release candidates.
_USES_RCS = ['cycle-with-milestones', 'cycle-trailing']
_USES_RCS = ['cycle-with-milestones', 'cycle-trailing', 'cycle-with-rc']
LOG = logging.getLogger('')

View File

@ -475,7 +475,7 @@ class Deliverable(object):
@property
def is_milestone_based(self):
return self.model == 'cycle-with-milestones'
return self.model in ['cycle-with-milestones', 'cycle-with-rc']
@property
def is_branchless(self):

View File

@ -3179,7 +3179,7 @@ class TestValidatePreReleaseProgression(base.BaseTestCase):
deliverable_data = yamlutils.loads(textwrap.dedent('''
---
team: Release Management
release-model: cycle-with-milestones
release-model: cycle-with-rc
'''))
deliv = deliverable.Deliverable(
None,
@ -3199,7 +3199,7 @@ class TestValidatePreReleaseProgression(base.BaseTestCase):
deliverable_data = yamlutils.loads(textwrap.dedent('''
---
team: Release Management
release-model: cycle-with-milestones
release-model: cycle-with-rc
releases:
- version: 1.5.1.0rc1
projects:
@ -3224,7 +3224,7 @@ class TestValidatePreReleaseProgression(base.BaseTestCase):
deliverable_data = yamlutils.loads(textwrap.dedent('''
---
team: Release Management
release-model: cycle-with-milestones
release-model: cycle-with-rc
releases:
- version: 1.5.1
projects:
@ -3253,7 +3253,7 @@ class TestValidatePreReleaseProgression(base.BaseTestCase):
deliverable_data = yamlutils.loads(textwrap.dedent('''
---
team: Release Management
release-model: cycle-with-milestones
release-model: cycle-with-rc
releases:
- version: 1.5.0.0rc1
projects:
@ -3282,7 +3282,7 @@ class TestValidatePreReleaseProgression(base.BaseTestCase):
deliverable_data = yamlutils.loads(textwrap.dedent('''
---
team: Release Management
release-model: cycle-with-milestones
release-model: cycle-with-rc
releases:
- version: 1.5.0.0rc1
projects:
@ -3315,7 +3315,7 @@ class TestValidatePreReleaseProgression(base.BaseTestCase):
deliverable_data = yamlutils.loads(textwrap.dedent('''
---
team: Release Management
release-model: cycle-with-milestones
release-model: cycle-with-rc
releases:
- version: 1.5.0
projects:
@ -3344,7 +3344,7 @@ class TestValidatePreReleaseProgression(base.BaseTestCase):
deliverable_data = yamlutils.loads(textwrap.dedent('''
---
team: Release Management
release-model: cycle-with-milestones
release-model: cycle-with-rc
releases:
- version: 1.5.0.0b1
projects:
@ -3373,7 +3373,7 @@ class TestValidatePreReleaseProgression(base.BaseTestCase):
deliverable_data = yamlutils.loads(textwrap.dedent('''
---
team: Release Management
release-model: cycle-with-milestones
release-model: cycle-with-rc
releases:
- version: 1.5.0.0b1
projects:

View File

@ -44,7 +44,7 @@ def repositories_list(deliverables_dir, series):
"""Yields (team, repo) tuples for cycle-with-milestones deliverables"""
deliverables = deliverable.Deliverables(deliverables_dir)
for d in deliverables.get_deliverables(None, series):
if d.model != 'cycle-with-milestones':
if d.model not in ['cycle-with-milestones', 'cycle-with-rc']:
continue
if not d.repos:
print('WARNING: no releases for {} in {}'.format(d.name, d.series))