Skip pre-caching /deb- repositories in nodepool images

Building a nodepool image is incredibly slow due to the git repo
precaching and it doesn't help that everything is cached twice.

Change-Id: I665bda6cde29aea9ad5285d8d6981ad9c19fc5a7
This commit is contained in:
Dirk Mueller 2017-02-22 21:25:58 +01:00
parent 0e3ebab51e
commit 5e161832b9
1 changed files with 13 additions and 8 deletions

View File

@ -50,15 +50,20 @@ def main():
for project in projects:
# Skip repos that are inactive
dirname = os.path.dirname(project)
if not ('attic' in dirname or dirname == 'stackforge'):
args = dict(
name=os.path.basename(project),
location=os.path.join('/opt/git', project),
url='%s/%s.git' % (GIT_BASE, project),
ref='*')
if ('attic' in dirname or dirname == 'stackforge'):
continue
# Skip the /deb- git repo copies
if ('/deb-' in project):
continue
projects_list.write("%(name)s git %(location)s "
"%(url)s %(ref)s\n" % args)
args = dict(
name=os.path.basename(project),
location=os.path.join('/opt/git', project),
url='%s/%s.git' % (GIT_BASE, project),
ref='*')
projects_list.write("%(name)s git %(location)s "
"%(url)s %(ref)s\n" % args)
# Clone openstack-infra/system-config again so that we can use it to
# build the image without interferring with the slave repo cache.
project = 'openstack-infra/system-config'