Skip repos if not handled by release management

Leverage the newly-introduced 'release-management' key from
projects.yaml to skip repositories in deliverables that are
not handled by the release-management team.

No longer maintain a local list of repository exceptions.

Change-Id: I0e5eab7a2aeb3bd09acf7bf01356a9f664530b0f
This commit is contained in:
Thierry Carrez 2019-01-31 14:24:57 +01:00
parent aa02471674
commit c1b2b78b07

View File

@ -20,7 +20,6 @@
import argparse import argparse
import os import os
import re
import sys import sys
import yaml import yaml
@ -29,27 +28,8 @@ import yaml
TEAM_EXCEPTIONS = [ TEAM_EXCEPTIONS = [
# Teams that are likely to be moved off TC governance # Teams that are likely to be moved off TC governance
'Infrastructure', 'Infrastructure',
'RefStack',
# Deployment tool teams with externally-released artifacts
'OpenStack Charms',
'Chef OpenStack',
'OpenStack-Helm',
] ]
WILDCARD_REPO_EXCEPTIONS = [
]
REPO_EXCEPTIONS = [
]
def is_a_repo_exception(repo):
for pattern in WILDCARD_REPO_EXCEPTIONS:
if re.match(pattern, repo):
return True
return repo in REPO_EXCEPTIONS
def is_a_team_exception(team): def is_a_team_exception(team):
return team in TEAM_EXCEPTIONS return team in TEAM_EXCEPTIONS
@ -123,8 +103,8 @@ def main(args=sys.argv[1:]):
if is_a_team_exception(tname): if is_a_team_exception(tname):
continue continue
for dname, deliverable in team['deliverables'].items(): for dname, deliverable in team['deliverables'].items():
for repo in deliverable.get('repos'): if 'release-management' not in deliverable:
if not is_a_repo_exception(repo): for repo in deliverable.get('repos'):
aclpath = os.path.join(aclbase, acl[repo]) aclpath = os.path.join(aclbase, acl[repo])
if issues_in_acl(repo, aclpath, args.patch): if issues_in_acl(repo, aclpath, args.patch):
print('%s (%s) in %s' % (repo, tname, acl[repo])) print('%s (%s) in %s' % (repo, tname, acl[repo]))