add a command to build the release dashboard
This new command will replace the one in the release-tools repository. It uses the deliverable data for a series to produce a dashboard for tracking the cycle-with-milestone releases so we can set up a spreadsheet to collaborate on keeping track of those releases. The old command included deliverables using other release models, but those are less important/useful to track in this manner. Change-Id: Ic613d65ae3d143cc910fec201205f1f84fde761c Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
06fdd784b7
commit
2f68553169
|
@ -448,3 +448,6 @@ easy as ``pip install .`` in this repository directory.
|
|||
set of projects.
|
||||
* ``missing-releases`` scans deliverable files and verifies that all
|
||||
of the releases that should have been tagged by hand have been
|
||||
* ``make-dashboard`` produces a CSV file that can be imported into
|
||||
Google docs (or any other spreadsheet) for tracking the
|
||||
milestone-based projects at the end of the cycle
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import csv
|
||||
import sys
|
||||
|
||||
import openstack_releases
|
||||
from openstack_releases import defaults
|
||||
from openstack_releases import deliverable
|
||||
from openstack_releases import governance
|
||||
|
||||
MILESTONE = 'cycle-with-milestones'
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
'--deliverables-dir',
|
||||
default=openstack_releases.deliverable_dir,
|
||||
help='location of deliverable files',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--series',
|
||||
default=defaults.RELEASE,
|
||||
help='the release series, such as "newton" or "ocata"',
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
all_deliv = deliverable.Deliverables(
|
||||
root_dir=args.deliverables_dir,
|
||||
collapse_history=False,
|
||||
)
|
||||
|
||||
interesting_deliverables = [
|
||||
d
|
||||
for d in (deliverable.Deliverable(t, s, dn, da)
|
||||
for t, s, dn, da in
|
||||
all_deliv.get_deliverables(None, args.series))
|
||||
if d.model == MILESTONE
|
||||
]
|
||||
|
||||
team_data = governance.get_team_data()
|
||||
teams = {
|
||||
n.lower(): governance.Team(n, i)
|
||||
for n, i in team_data.items()
|
||||
}
|
||||
|
||||
# Dump the dashboard data
|
||||
writer = csv.writer(sys.stdout)
|
||||
writer.writerow(
|
||||
('Team',
|
||||
'Deliverable Type',
|
||||
'Deliverable Name',
|
||||
'Pre-RC1',
|
||||
'RC1',
|
||||
'Branched at',
|
||||
'Latest RC',
|
||||
'Release Notes',
|
||||
'Comments',
|
||||
'PTL Nick',
|
||||
'PTL Email',
|
||||
'IRC Channel')
|
||||
)
|
||||
|
||||
for deliv in sorted(interesting_deliverables,
|
||||
key=lambda x: (x.team, x.name)):
|
||||
team = teams[d.team.lower()]
|
||||
writer.writerow(
|
||||
(deliv.team.lower(),
|
||||
deliv.type,
|
||||
deliv.name,
|
||||
deliv.latest_release,
|
||||
'', # RC1
|
||||
deliv.get_branch_location('stable/' + args.series), # branched at
|
||||
'', # latest RC
|
||||
deliv.release_notes,
|
||||
'', # Comments
|
||||
team.data['ptl']['irc'],
|
||||
team.data['ptl']['email'],
|
||||
team.data.get('irc-channel'))
|
||||
)
|
|
@ -202,3 +202,19 @@ class Deliverable(object):
|
|||
@property
|
||||
def type(self):
|
||||
return self._data.get('type', 'other')
|
||||
|
||||
@property
|
||||
def latest_release(self):
|
||||
rel = self._data.get('releases', [{}])[0]
|
||||
return rel.get('version')
|
||||
|
||||
@property
|
||||
def release_notes(self):
|
||||
return self._data.get('release-notes', '')
|
||||
|
||||
def get_branch_location(self, name):
|
||||
branches = self._data.get('branches', [])
|
||||
for b in branches:
|
||||
if b['name'] == name:
|
||||
return b['location']
|
||||
return None
|
||||
|
|
|
@ -30,6 +30,7 @@ console_scripts =
|
|||
missing-releases = openstack_releases.cmds.missing:main
|
||||
check-diff-start = openstack_releases.cmds.check_diff_start:main
|
||||
list-deliverables = openstack_releases.cmds.list_deliverables:main
|
||||
make-dashboard = openstack_releases.cmds.dashboard:main
|
||||
|
||||
[extras]
|
||||
sphinxext =
|
||||
|
|
Loading…
Reference in New Issue