Merge "Allow to tag projects as "last" on EM branches"
This commit is contained in:
commit
301a0c1ad2
@ -55,9 +55,9 @@ updates.
|
||||
|
||||
.. note::
|
||||
If a branch is marked as Extended Maintenance, that means individual
|
||||
projects can be in state *Maintained*, *Unmaintained* or *End of Life* on
|
||||
that branch. Please check specific project about its actual status on the
|
||||
given branch.
|
||||
projects can be in state *Maintained*, *Unmaintained*, *Last* or
|
||||
*End of Life* on that branch. Please check specific project about its
|
||||
actual status on the given branch.
|
||||
|
||||
.. _Maintenance phases: https://docs.openstack.org/project-team-guide/stable-branches.html#maintenance-phases
|
||||
.. _old phases: https://github.com/openstack/project-team-guide/blob/1c837bf0~/doc/source/stable-branches.rst
|
||||
|
@ -1102,6 +1102,24 @@ def validate_version_numbers(deliv, context):
|
||||
release.version, deliv.series))
|
||||
continue
|
||||
|
||||
if release.is_last:
|
||||
LOG.debug('Found new LAST tag {} for {}'.format(
|
||||
release.version, deliv.name))
|
||||
if deliv.is_independent:
|
||||
context.warning(
|
||||
'LAST tag {} on independent deliverable, branch not validated'.format(
|
||||
release.version))
|
||||
continue
|
||||
if release.version != "{}-last".format(deliv.series):
|
||||
context.error(
|
||||
"LAST tag {} should match branch name (e.g {}-last)".format(
|
||||
release.version, deliv.series))
|
||||
if not deliv.series_info.is_em:
|
||||
context.error(
|
||||
"LAST tag {} aren't allowed on a series ({}) that are not EM".format(
|
||||
release.version, deliv.series))
|
||||
continue
|
||||
|
||||
for project in release.projects:
|
||||
|
||||
if not gitutils.checkout_ref(context.workdir, project.repo.name,
|
||||
@ -1303,6 +1321,9 @@ def validate_new_releases_in_open_series(deliv, context):
|
||||
elif release.is_em:
|
||||
LOG.debug('Found new EM tag {} for {}'.format(
|
||||
release.version, project.repo))
|
||||
elif release.is_last:
|
||||
LOG.debug('Found new LAST tag {} for {}'.format(
|
||||
release.version, project.repo))
|
||||
else:
|
||||
LOG.debug('Found new version {} for {}'.format(
|
||||
release.version, project.repo))
|
||||
|
@ -64,7 +64,9 @@ def _version_sort_key(release):
|
||||
# won't have more than 1000 major releases of anything, and I
|
||||
# surely hope that is a safe assumption.
|
||||
version_string = release['version']
|
||||
if version_string.endswith('-eol') or version_string.endswith('-em'):
|
||||
if version_string.endswith('-eol') or \
|
||||
version_string.endswith('-em') or \
|
||||
version_string.endswith('-last'):
|
||||
return _safe_semver('1000.0.0')
|
||||
return _safe_semver(version_string)
|
||||
|
||||
@ -338,6 +340,10 @@ class Release(object):
|
||||
def is_em(self):
|
||||
return self.version.endswith('-em')
|
||||
|
||||
@property
|
||||
def is_last(self):
|
||||
return self.version.endswith('-last')
|
||||
|
||||
@property
|
||||
def em_series(self):
|
||||
if self.is_em:
|
||||
|
Loading…
Reference in New Issue
Block a user