add untagged release model for devstack and grenade
Change-Id: I9fad5ca61c07ec6f985fa479bb1c5f1427b9217b Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
3e85bbfc74
commit
57639f8b8f
@ -1,6 +1,6 @@
|
||||
---
|
||||
launchpad: devstack
|
||||
release-model: cycle-with-milestones
|
||||
release-model: untagged
|
||||
team: Quality Assurance
|
||||
type: other
|
||||
stable-branch-type: tagless
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
launchpad: grenade
|
||||
release-model: cycle-with-milestones
|
||||
release-model: untagged
|
||||
team: Quality Assurance
|
||||
type: other
|
||||
stable-branch-type: tagless
|
||||
|
@ -93,3 +93,11 @@ projects.
|
||||
* "independent" projects produce releases from time to time.
|
||||
* Release tags for deliverables using this tag are managed without
|
||||
oversight from the Release Management team.
|
||||
|
||||
.. _model-untagged:
|
||||
|
||||
untagged
|
||||
========
|
||||
|
||||
Some CI tools are used only from source and never tag releases, but
|
||||
need to create stable branches.
|
||||
|
@ -165,7 +165,7 @@ def main():
|
||||
if args.no_stable_branch:
|
||||
if deliv.get_branch_location('stable/' + series) is not None:
|
||||
continue
|
||||
if args.unreleased and deliv.versions:
|
||||
if args.unreleased and (deliv.versions or not deliv.is_releasable):
|
||||
continue
|
||||
if version_ending and deliv.latest_release and deliv.latest_release.endswith(version_ending):
|
||||
continue
|
||||
|
@ -66,6 +66,7 @@ _VALID_MODELS = set([
|
||||
'cycle-with-intermediary',
|
||||
'cycle-trailing',
|
||||
'independent',
|
||||
'untagged',
|
||||
])
|
||||
_USES_PREVER = set([
|
||||
'cycle-with-milestones',
|
||||
@ -321,6 +322,10 @@ def validate_releases(deliverable_info, zuul_layout,
|
||||
release_type = deliverable_info.get('release-type', 'std')
|
||||
link_mode = deliverable_info.get('artifact-link-mode', 'tarball')
|
||||
|
||||
if release_model == 'untagged' and 'releases' in deliverable_info:
|
||||
mk_error('untagged deliverables should not have a "releases" section')
|
||||
return
|
||||
|
||||
prev_version = None
|
||||
prev_projects = set()
|
||||
for release in deliverable_info.get('releases', []):
|
||||
|
@ -220,6 +220,10 @@ class Deliverable(object):
|
||||
return 'independent'
|
||||
return self._data.get('release-model', '').lstrip('_')
|
||||
|
||||
@property
|
||||
def is_releasable(self):
|
||||
return self.model != 'untagged'
|
||||
|
||||
@property
|
||||
def is_cycle_based(self):
|
||||
return self.model.startswith('cycle-')
|
||||
|
@ -23,7 +23,7 @@ properties:
|
||||
type: "boolean"
|
||||
release-model:
|
||||
type: "string"
|
||||
enum: ["cycle-with-intermediary", "cycle-with-milestones", "cycle-trailing"]
|
||||
enum: ["cycle-with-intermediary", "cycle-with-milestones", "cycle-trailing", "untagged"]
|
||||
type:
|
||||
type: "string"
|
||||
enum: ["horizon-plugin", "library", "service", "other"]
|
||||
|
@ -751,6 +751,31 @@ class TestValidateReleases(base.BaseTestCase):
|
||||
self.assertEqual(0, len(warnings))
|
||||
self.assertEqual(0, len(errors))
|
||||
|
||||
def test_untagged_with_releases(self):
|
||||
deliverable_info = {
|
||||
'release-model': 'untagged',
|
||||
'artifact-link-mode': 'none',
|
||||
'releases': [
|
||||
{'version': '99.5.0',
|
||||
'projects': [
|
||||
{'repo': 'openstack/automaton',
|
||||
'hash': 'be2885f544637e6ee6139df7dc7bf937925804dd'},
|
||||
]},
|
||||
]
|
||||
}
|
||||
warnings = []
|
||||
errors = []
|
||||
validate.validate_releases(
|
||||
deliverable_info,
|
||||
{'validate-projects-by-name': {}},
|
||||
'ocata',
|
||||
self.tmpdir,
|
||||
warnings.append,
|
||||
errors.append,
|
||||
)
|
||||
self.assertEqual(0, len(warnings))
|
||||
self.assertEqual(1, len(errors))
|
||||
|
||||
|
||||
class TestPuppetUtils(base.BaseTestCase):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user