update history import tools for liberty

Ignore git tags that appear to be part of a series other than liberty.

Add an option to only import launchpad history from a specific branch.

Update build_tag_history.sh to pull in the history of unmanaged projects.

Change-Id: Ife22a9b808d91193ef4f9eef97e11b48ed79375a
This commit is contained in:
Doug Hellmann 2015-10-16 22:24:18 +00:00
parent f1638d94f0
commit ee7ebba4d5
3 changed files with 110 additions and 9 deletions

View File

@ -3,27 +3,121 @@
# Run as: tox -e history
TOOLSDIR=$(dirname $0)
REPOS=/mnt/repos/openstack
REPOS=/mnt/repos
if [ ! -z "$1" ]; then
cd $1
fi
function gen {
$TOOLSDIR/tag_history_from_lp.py $@
$TOOLSDIR/tag_history_from_lp.py --series liberty $1 $REPOS/$2
}
function gen_from_git {
$TOOLSDIR/tag_history_from_git.py $@
$TOOLSDIR/tag_history_from_git.py $1 $REPOS/$2
}
CLIENT_NAMES="
# No repository or series history in LP
# gen astara openstack/astara
gen_from_git cloudkitty stackforge/cloudkitty
# Only pre-release versions
gen_from_git congress openstack/congress
# Only alpha versions
gen_from_git cue openstack/cue
gen_from_git gnocchi openstack/gnocchi
gen_from_git coreos-image-builder openstack/coreos-image-builder
gen_from_git ironic-inspector openstack/ironic-inspector
gen_from_git magnum openstack/magnum
gen_from_git magnum-ui openstack/magnum-ui
gen_from_git mistral openstack/mistral
gen_from_git murano openstack/murano
gen_from_git murano-agent openstack/murano-agent
gen_from_git murano-apps openstack/murano-apps
gen_from_git murano-dashboard openstack/murano-dashboard
gen_from_git searchlight openstack/searchlight
gen_from_git solum openstack/solum
gen_from_git dib-utils openstack/dib-utils
gen_from_git diskimage-builder openstack/diskimage-builder
gen_from_git instack-undercloud openstack/instack-undercloud
gen_from_git os-apply-config openstack/os-apply-config
gen_from_git os-cloud-config openstack/os-cloud-config
gen_from_git os-collect-config openstack/os-collect-config
gen_from_git os-net-config openstack/os-net-config
gen_from_git os-refresh-config openstack/os-refresh-config
gen_from_git tuskar openstack/tuskar
# These lib repositories don't exist
# openstack/networking-hpe
# openstack/networking-hyperv
LIB_NAMES="
stackforge/python-cloudkittyclient
stackforge/cloudkitty-dashboard
openstack/python-congressclient
openstack/cue-dashboard
openstack/python-cueclient
openstack/castellan
openstack/designate-dashboard
openstack/python-gnocchiclient
openstack/django-openstack-auth-kerberos
openstack/horizon-cisco-ui
openstack/manila-ui
openstack/tuskar-ui
openstack/python-dracclient
openstack/python-ironic-inspector-client
openstack/python-magnumclient
openstack/mistral-dashboard
openstack/python-mistralclient
openstack/python-muranoclient
openstack/dragonflow
openstack/kuryr
openstack/networking-ale-omniswitch
openstack/networking-arista
openstack/networking-bgpvpn
openstack/networking-calico
openstack/networking-cisco
openstack/networking-fortinet
openstack/networking-infoblox
openstack/networking-fujitsu
openstack/networking-l2gw
openstack/networking-lenovo
openstack/networking-midonet
openstack/networking-odl
openstack/networking-ofagent
openstack/networking-onos
openstack/networking-ovn
openstack/networking-plumgrid
openstack/networking-powervm
openstack/networking-sfc
openstack/networking-vsphere
openstack/octavia
openstack/python-neutron-pd-driver
openstack/vmware-nsx
openstack/rally
openstack/python-solumclient
openstack/solum-dashboard
openstack/instack
openstack/python-tripleoclient
openstack/python-tuskarclient
openstack/tripleo-common
openstack/tripleo-heat-templates
openstack/tripleo-image-elements
"
# ALL CLIENTS
for c in $CLIENT_NAMES; do
d=$REPOS/$c
gen_from_git $(basename $d) $d
# ALL LIBS
for c in $LIB_NAMES; do
gen_from_git $(basename $c) $c
done
# Remove things that don't look like named releases

View File

@ -80,7 +80,7 @@ repo_namespace = os.path.basename(os.path.dirname(repo))
repo_short_name = repo_namespace + '/' + os.path.basename(repo)
for tag in tags:
if '-' in tag:
if ('-' in tag) or ('rc' in tag) or ('a' in tag) or ('b' in tag):
print('ignoring %r' % tag)
continue
try:
@ -96,6 +96,9 @@ for tag in tags:
print('did not find milestone %s tagged for %s' %
(tag, repo_short_name))
continue
if series_name != 'liberty':
print('skipping releases other than liberty (%r)' % series_name)
continue
the_series = series_data.setdefault(series_name, {})
the_milestone = the_series.setdefault(tag, [])
the_milestone.append(

View File

@ -41,6 +41,7 @@ def abort(code, errmsg):
parser = argparse.ArgumentParser()
parser.add_argument('project', help='launchpad project name')
parser.add_argument('repo', nargs='+', help='repository directory')
parser.add_argument('--series', help='series to scan')
args = parser.parse_args()
# Connect to LP
@ -71,6 +72,9 @@ for repo in args.repo:
repo_short_name = repo_namespace + '/' + os.path.basename(repo)
for series in project.series:
if args.series and series.name != args.series:
print('skipping series %r' % series.name)
continue
for milestone in series.all_milestones:
try:
show_output = subprocess.check_output([