Fix fetch remotes script post projects.yaml update

The format of the projects.yaml file has been updated and
fetch_remotes.py could not parse it. Correct this by making
fetch_remotes.py aware of the format changes.

Change-Id: Ic0680d02c0e9ce31aae805ac2495957f106acb0a
Reviewed-on: https://review.openstack.org/16098
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Clark Boylan 2012-11-14 09:11:09 -08:00 committed by Jenkins
parent 0d5361bb49
commit 99a160120d

View File

@ -16,6 +16,12 @@
# Fetch remotes reads a project config file called projects.yaml
# It should look like:
# - homepage: http://openstack.org
# team-id: 153703
# has-wiki: False
# has-issues: False
# has-downloads: False
# ---
# - project: PROJECT_NAME
# options:
# - remote: https://gerrit.googlesource.com/gerrit
@ -50,7 +56,7 @@ REPO_ROOT = os.environ.get('REPO_ROOT',
PROJECTS_YAML = os.environ.get('PROJECTS_YAML',
'/home/gerrit2/projects.yaml')
config = yaml.load(open(PROJECTS_YAML))
(defaults, config) = [config for config in yaml.load_all(open(PROJECTS_YAML))]
for section in config:
project = section['project']