Alias zuul git repos to git.zuul-ci.org
This adds support for the cgit-alias directive added in https://review.openstack.org/555105. It's safe to land this change before or after the implementation. It also aliases the zuul project repos to git.zuul-ci.org. Change-Id: I05a7156e092faad1457973b88537ec73012a5c96
This commit is contained in:
@@ -249,6 +249,9 @@
|
|||||||
- openstack-ci
|
- openstack-ci
|
||||||
- project: openstack-infra/nodepool
|
- project: openstack-infra/nodepool
|
||||||
use-storyboard: true
|
use-storyboard: true
|
||||||
|
cgit-alias:
|
||||||
|
site: git.zuul-ci.org
|
||||||
|
path: nodepool
|
||||||
groups:
|
groups:
|
||||||
- openstack-ci
|
- openstack-ci
|
||||||
description: Manage a pool of nodes for a distributed test infrastructure
|
description: Manage a pool of nodes for a distributed test infrastructure
|
||||||
@@ -837,16 +840,25 @@
|
|||||||
acl-config: /home/gerrit2/acls/openstack-infra/zuul.config
|
acl-config: /home/gerrit2/acls/openstack-infra/zuul.config
|
||||||
- project: openstack-infra/zuul
|
- project: openstack-infra/zuul
|
||||||
use-storyboard: true
|
use-storyboard: true
|
||||||
|
cgit-alias:
|
||||||
|
site: git.zuul-ci.org
|
||||||
|
path: zuul
|
||||||
groups:
|
groups:
|
||||||
- openstack-ci
|
- openstack-ci
|
||||||
description: The Gatekeeper, or a project gating system
|
description: The Gatekeeper, or a project gating system
|
||||||
- project: openstack-infra/zuul-base-jobs
|
- project: openstack-infra/zuul-base-jobs
|
||||||
use-storyboard: true
|
use-storyboard: true
|
||||||
|
cgit-alias:
|
||||||
|
site: git.zuul-ci.org
|
||||||
|
path: zuul-base-jobs
|
||||||
groups:
|
groups:
|
||||||
- openstack-ci
|
- openstack-ci
|
||||||
description: Zuul base job definition
|
description: Zuul base job definition
|
||||||
- project: openstack-infra/zuul-jobs
|
- project: openstack-infra/zuul-jobs
|
||||||
use-storyboard: true
|
use-storyboard: true
|
||||||
|
cgit-alias:
|
||||||
|
site: git.zuul-ci.org
|
||||||
|
path: zuul-jobs
|
||||||
groups:
|
groups:
|
||||||
- openstack-ci
|
- openstack-ci
|
||||||
description: Ansible job definitions for Zuul
|
description: Ansible job definitions for Zuul
|
||||||
@@ -857,11 +869,17 @@
|
|||||||
description: Zuul packaging
|
description: Zuul packaging
|
||||||
- project: openstack-infra/zuul-sphinx
|
- project: openstack-infra/zuul-sphinx
|
||||||
use-storyboard: true
|
use-storyboard: true
|
||||||
|
cgit-alias:
|
||||||
|
site: git.zuul-ci.org
|
||||||
|
path: zuul-sphinx
|
||||||
groups:
|
groups:
|
||||||
- openstack-ci
|
- openstack-ci
|
||||||
description: Sphinx extension for Zuul jobs
|
description: Sphinx extension for Zuul jobs
|
||||||
- project: openstack-infra/zuul-website
|
- project: openstack-infra/zuul-website
|
||||||
use-storyboard: true
|
use-storyboard: true
|
||||||
|
cgit-alias:
|
||||||
|
site: git.zuul-ci.org
|
||||||
|
path: zuul-website
|
||||||
groups:
|
groups:
|
||||||
- openstack-ci
|
- openstack-ci
|
||||||
description: The contents of the Zuul website
|
description: The contents of the Zuul website
|
||||||
|
|||||||
@@ -108,11 +108,13 @@ def main():
|
|||||||
|
|
||||||
VALID_LABELS = ["acl-config", "description", "docimpact-group",
|
VALID_LABELS = ["acl-config", "description", "docimpact-group",
|
||||||
"groups", "homepage", "options", "project",
|
"groups", "homepage", "options", "project",
|
||||||
"upstream", "upstream-prefix", "use-storyboard"]
|
"upstream", "upstream-prefix", "use-storyboard",
|
||||||
|
"cgit-alias"]
|
||||||
VALID_SCHEMES = ['https://', 'http://', 'git://']
|
VALID_SCHEMES = ['https://', 'http://', 'git://']
|
||||||
DESCRIPTION_REQUIRED = ['openstack', 'openstack-infra', 'openstack-dev',
|
DESCRIPTION_REQUIRED = ['openstack', 'openstack-infra', 'openstack-dev',
|
||||||
'stackforge']
|
'stackforge']
|
||||||
VALID_OPTIONS = ['delay-release', 'track-upstream', 'translate']
|
VALID_OPTIONS = ['delay-release', 'track-upstream', 'translate']
|
||||||
|
CGIT_ALIAS_SITES = ['zuul-ci.org']
|
||||||
|
|
||||||
for p in projects:
|
for p in projects:
|
||||||
name = p.get('project')
|
name = p.get('project')
|
||||||
@@ -189,6 +191,29 @@ def main():
|
|||||||
found_errors += 1
|
found_errors += 1
|
||||||
print("ERROR: Unknown keyword '%s' in project %s" %
|
print("ERROR: Unknown keyword '%s' in project %s" %
|
||||||
(entry, name))
|
(entry, name))
|
||||||
|
# Check for valid cgit aliases
|
||||||
|
cgit_alias = p.get('cgit_alias')
|
||||||
|
if cgit_alias:
|
||||||
|
if not isinstance(cgit_alias, dict):
|
||||||
|
found_errors += 1
|
||||||
|
print("ERROR: cgit alias in project %s must be a dict" %
|
||||||
|
(name,))
|
||||||
|
else:
|
||||||
|
if 'site' not in cgit_alias or 'path' not in cgit_alias:
|
||||||
|
found_errors += 1
|
||||||
|
print("ERROR: cgit alias in project %s must have "
|
||||||
|
"a site and path" % (name,))
|
||||||
|
else:
|
||||||
|
site = cgit_alias['site']
|
||||||
|
path = cgit_alias['path']
|
||||||
|
if path.startswith('/'):
|
||||||
|
found_errors += 1
|
||||||
|
print("ERROR: cgit alias path in project %s must "
|
||||||
|
"not begin with /" % (name,))
|
||||||
|
if site not in CGIT_ALIAS_SITES:
|
||||||
|
found_errors += 1
|
||||||
|
print("ERROR: cgit alias site in project %s is "
|
||||||
|
"not valid" % (name,))
|
||||||
# Check for valid options
|
# Check for valid options
|
||||||
for option in p.get('options', []):
|
for option in p.get('options', []):
|
||||||
if option not in VALID_OPTIONS:
|
if option not in VALID_OPTIONS:
|
||||||
|
|||||||
Reference in New Issue
Block a user