import doc tool history
The documentation tools did not have launchpad projects from which we could import the version numbers in the appropriate series, so approximate that by comparing the dates of the tags to the end date of the release cycles. Change-Id: Ibbca82ff37dffab7b93b91104cba783cc7073a6d
This commit is contained in:
55
deliverables/icehouse/openstack-doc-tools.yaml
Normal file
55
deliverables/icehouse/openstack-doc-tools.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
launchpad: openstack-doc-tools
|
||||
releases:
|
||||
- version: 0.1
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: c5097f9992e3d12179bebca469f9c0b900cb70a5
|
||||
- version: 0.10
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 0efad094839eda475f82fae7e03391df29086418
|
||||
- version: 0.2
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: b323c8e30f9bd5795187312cf45ca16a793377f0
|
||||
- version: 0.3
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 89d91f2d2abe9ab22101822a6dc9b7ac5c1e7ae1
|
||||
- version: 0.4
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: c586091172c97021763cfc2d2fb3d1880371e097
|
||||
- version: 0.5
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 131a50461b57d4e125d143591b6dd22da74173c3
|
||||
- version: 0.6
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 50ba3733b1d6c0680621b1e7652ff3989f1d5e24
|
||||
- version: 0.7
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 87f8c5e7f46ab7807d2db286b73aaf688a315129
|
||||
- version: 0.7.1
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 1763efc4a38c98fa59733f9c1e8dbc9245349c7e
|
||||
- version: 0.8
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: b3b96eb65ccb1c4c7d6667958555b58a461b2586
|
||||
- version: 0.8.1
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 4604cbbcbb9053d2328dea8f11f8e4c42c699570
|
||||
- version: 0.8.2
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 15601d407c3d3527a97077f84cce71d6fd61d8b3
|
||||
- version: 0.9
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 1083e40d21d4fda3647e2d2f90f47e70de5d7345
|
||||
51
deliverables/juno/openstack-doc-tools.yaml
Normal file
51
deliverables/juno/openstack-doc-tools.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
launchpad: openstack-doc-tools
|
||||
releases:
|
||||
- version: 0.11
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 38632366024762c626e0697a8a42b93d64913b9a
|
||||
- version: 0.12
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 6659c8043587b212607cf38b9366a218cd0139c4
|
||||
- version: 0.13
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: a8cb0407d86636c59465eac98f5d7f50e1655093
|
||||
- version: 0.14
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 8618b9aeb7d20a09bec32bf856faa6950bd9b26e
|
||||
- version: 0.15
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 2af6041d179b26976d539a3439eafdcb65a6df1e
|
||||
- version: 0.16
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: ca4b24b3960f79741fb011c78d67cf88e0559ee0
|
||||
- version: 0.16.1
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 4a4da3e263c8b040249ffdd76e5285c3e8429557
|
||||
- version: 0.17
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 6958e7aaed21dd7ede795e6044dfe0c1491b98b4
|
||||
- version: 0.18
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: f8d8886cc08f485c06869f5fdf7788a510fc8f17
|
||||
- version: 0.18.1
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: edb4ff499811f1c23de136025f96cc032037474f
|
||||
- version: 0.19
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 20139677b35f3580097891c1c2ea63cb31f1de76
|
||||
- version: 0.20
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 4906d5018d19439c99f304724f1c06ddfa1d0f7d
|
||||
27
deliverables/kilo/openstack-doc-tools.yaml
Normal file
27
deliverables/kilo/openstack-doc-tools.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
launchpad: openstack-doc-tools
|
||||
releases:
|
||||
- version: 0.21
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 987748f89df9e77a837b77bd142f06e8ad395d6e
|
||||
- version: 0.21.1
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: e77e51365b563fefd7a0eb6a15b6bcf79160e755
|
||||
- version: 0.22
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: ec79ad567275c6ce663e45ecf5c295318b1fa4b6
|
||||
- version: 0.23
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 658f29cc2e84abc7d4d6fe3e34eaed43555562ef
|
||||
- version: 0.24
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 66843e24409c528f09ba51fdb0d833d749c7b9ba
|
||||
- version: 0.25
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: feba2086be3d8cd9280f5181a4bac4341413936f
|
||||
35
deliverables/kilo/openstackdocstheme.yaml
Normal file
35
deliverables/kilo/openstackdocstheme.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
launchpad: openstackdocstheme
|
||||
releases:
|
||||
- version: 1.0
|
||||
projects:
|
||||
- repo: openstack/openstackdocstheme
|
||||
hash: 63ed912e102320f23f7fddb0705814b23f8f5e9a
|
||||
- version: 1.0.1
|
||||
projects:
|
||||
- repo: openstack/openstackdocstheme
|
||||
hash: 3e05dffc7b0a40a2f7728905d21b7bfcb715e487
|
||||
- version: 1.0.2
|
||||
projects:
|
||||
- repo: openstack/openstackdocstheme
|
||||
hash: 63ed912e102320f23f7fddb0705814b23f8f5e9a
|
||||
- version: 1.0.3
|
||||
projects:
|
||||
- repo: openstack/openstackdocstheme
|
||||
hash: 24e2d74c56bf6f369dc2e1f446865e54e60c2cf0
|
||||
- version: 1.0.4
|
||||
projects:
|
||||
- repo: openstack/openstackdocstheme
|
||||
hash: c6f23a804f6681e73895bd3d7d1675a57030e427
|
||||
- version: 1.0.5
|
||||
projects:
|
||||
- repo: openstack/openstackdocstheme
|
||||
hash: 751ec9c58ea8e5aa83c6e7dc3f2cd33290ddf8da
|
||||
- version: 1.0.6
|
||||
projects:
|
||||
- repo: openstack/openstackdocstheme
|
||||
hash: 40c2c4fdb97f62ce1d88962f77909cbca4027f6f
|
||||
- version: 1.0.7
|
||||
projects:
|
||||
- repo: openstack/openstackdocstheme
|
||||
hash: 626c47ba98b8db40fda76571f9b24386b3375502
|
||||
27
deliverables/liberty/openstack-doc-tools.yaml
Normal file
27
deliverables/liberty/openstack-doc-tools.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
launchpad: openstack-doc-tools
|
||||
releases:
|
||||
- version: 0.26
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: fcfe1f6af37390acbad34c8b96f0611f1baf33d6
|
||||
- version: 0.26.0
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: fcfe1f6af37390acbad34c8b96f0611f1baf33d6
|
||||
- version: 0.27.0
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: e71193b6feebf4923224eca36e00f29b00e40105
|
||||
- version: 0.28.0
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 552c693585eee0d00a50978dea68414f07f963a2
|
||||
- version: 0.29.0
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: 072fc1d6190994b09dd7ef271e38c50b820e5fdd
|
||||
- version: 0.29.1
|
||||
projects:
|
||||
- repo: openstack/openstack-doc-tools
|
||||
hash: f7895df40e2730df424913e169c1f1fdfe9338a7
|
||||
11
deliverables/liberty/openstackdocstheme.yaml
Normal file
11
deliverables/liberty/openstackdocstheme.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
launchpad: openstackdocstheme
|
||||
releases:
|
||||
- version: 1.0.8
|
||||
projects:
|
||||
- repo: openstack/openstackdocstheme
|
||||
hash: 69b061c684c73d6a51c84d10fb9e5aaefe043559
|
||||
- version: 1.1.0
|
||||
projects:
|
||||
- repo: openstack/openstackdocstheme
|
||||
hash: 9587cc5fbbe1d56ec5e1abf2f29dbfc759caba0a
|
||||
@@ -13,6 +13,13 @@ function gen {
|
||||
$TOOLSDIR/tag_history_from_lp.py $@
|
||||
}
|
||||
|
||||
function gen_from_git {
|
||||
$TOOLSDIR/tag_history_from_git.py $@
|
||||
}
|
||||
|
||||
gen_from_git openstackdocstheme $REPOS/openstackdocstheme
|
||||
gen_from_git openstack-doc-tools $REPOS/openstack-doc-tools
|
||||
|
||||
gen nova $REPOS/nova
|
||||
|
||||
gen swift $REPOS/swift
|
||||
@@ -71,7 +78,7 @@ gen os-testr $REPOS/os-testr
|
||||
# NOTE(dhellmann): This launchpad project hasn't been set up yet.
|
||||
# gen bashate $REPOS/bashate
|
||||
|
||||
TripleO ?
|
||||
# TripleO ?
|
||||
|
||||
gen zaqar $REPOS/zaqar
|
||||
|
||||
|
||||
129
tools/tag_history_from_git.py
Executable file
129
tools/tag_history_from_git.py
Executable file
@@ -0,0 +1,129 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Import the history for the project
|
||||
|
||||
Use git as the canonical source of version numbers.
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import argparse
|
||||
import datetime
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from launchpadlib.launchpad import Launchpad
|
||||
|
||||
# From https://wiki.openstack.org/wiki/Releases
|
||||
RELEASES = [
|
||||
('austin', datetime.datetime(2010, 10, 21)),
|
||||
('bexar', datetime.datetime(2011, 2, 3)),
|
||||
('cactus', datetime.datetime(2011, 4, 15)),
|
||||
('diablo', datetime.datetime(2011, 9, 22)),
|
||||
('essex', datetime.datetime(2012, 4, 5)),
|
||||
('folsom', datetime.datetime(2012, 9, 27)),
|
||||
('grizzly', datetime.datetime(2013, 4, 4)),
|
||||
('havana', datetime.datetime(2013, 10, 17)),
|
||||
('icehouse', datetime.datetime(2014, 4, 17)),
|
||||
('juno', datetime.datetime(2014, 10, 16)),
|
||||
('kilo', datetime.datetime(2015, 4, 30)),
|
||||
('liberty', datetime.datetime(2015, 10, 15)),
|
||||
]
|
||||
|
||||
|
||||
def abort(code, errmsg):
|
||||
print(errmsg, file=sys.stderr)
|
||||
sys.exit(code)
|
||||
|
||||
|
||||
def date_to_release(tag_date):
|
||||
for release, end_date in RELEASES:
|
||||
if tag_date <= end_date:
|
||||
return release
|
||||
return 'UNKNOWN'
|
||||
|
||||
|
||||
# Argument parsing
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('project', help='launchpad project name')
|
||||
parser.add_argument('repo', help='repository directory')
|
||||
args = parser.parse_args()
|
||||
|
||||
# Connect to LP
|
||||
print("connecting to launchpad")
|
||||
try:
|
||||
launchpad = Launchpad.login_with('openstack-releasing', 'production')
|
||||
except Exception, error:
|
||||
abort(2, 'Could not connect to Launchpad: ' + str(error))
|
||||
|
||||
before = os.getcwd()
|
||||
dev_null = open('/dev/null', 'w')
|
||||
repo = args.repo
|
||||
series_data = {}
|
||||
|
||||
os.chdir(repo)
|
||||
|
||||
# Retrieve the existing tags
|
||||
tags_out = subprocess.check_output(['git', 'tag'])
|
||||
tags = [t.strip() for t in tags_out.splitlines() if t.strip()]
|
||||
|
||||
repo_namespace = os.path.basename(os.path.dirname(repo))
|
||||
repo_short_name = repo_namespace + '/' + os.path.basename(repo)
|
||||
|
||||
for tag in tags:
|
||||
try:
|
||||
show_output = subprocess.check_output([
|
||||
'git', 'show', '--no-patch', '--pretty=%H %ct', tag,
|
||||
], stderr=dev_null)
|
||||
interesting = show_output.rstrip().splitlines()[-1]
|
||||
print(tag + ' ' + interesting)
|
||||
sha, ignore, datestr = interesting.partition(' ')
|
||||
tag_date = datetime.datetime.utcfromtimestamp(float(datestr))
|
||||
series_name = date_to_release(tag_date)
|
||||
except subprocess.CalledProcessError:
|
||||
print('did not find milestone %s tagged for %s' %
|
||||
(tag, repo_short_name))
|
||||
continue
|
||||
the_series = series_data.setdefault(series_name, {})
|
||||
the_milestone = the_series.setdefault(tag, [])
|
||||
the_milestone.append(
|
||||
(repo_short_name, sha)
|
||||
)
|
||||
|
||||
os.chdir(before)
|
||||
|
||||
for series, milestones in sorted(series_data.items()):
|
||||
# print(series, milestones)
|
||||
d = 'deliverables/%s' % series
|
||||
if not os.path.exists(d):
|
||||
print('creating directory %s' % d)
|
||||
os.makedirs(d)
|
||||
filename = '%s/%s.yaml' % (d, args.project)
|
||||
print('creating %s' % filename)
|
||||
with open(filename, 'w') as f:
|
||||
f.write('---\n')
|
||||
f.write('launchpad: %s\n' % args.project)
|
||||
f.write('releases:\n')
|
||||
for milestone, milestone_data in sorted(milestones.items()):
|
||||
f.write(' - version: %s\n' % milestone)
|
||||
f.write(' projects:\n')
|
||||
for repo_short_name, sha in milestone_data:
|
||||
f.write(' - repo: %s\n' % repo_short_name)
|
||||
f.write(' hash: %s\n' % sha)
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Ensure the given milestone exists on Launchpad
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
@@ -16,6 +14,12 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""Import the history for the project
|
||||
|
||||
Use launchpad as the canonical source of version numbers.
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
@@ -34,7 +38,7 @@ def abort(code, errmsg):
|
||||
|
||||
|
||||
# Argument parsing
|
||||
parser = argparse.ArgumentParser(description='Create milestones on LP')
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('project', help='launchpad project name')
|
||||
parser.add_argument('repo', nargs='+', help='repository directory')
|
||||
args = parser.parse_args()
|
||||
|
||||
Reference in New Issue
Block a user