aboutsummaryrefslogtreecommitdiff
path: root/kolla/image
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-03-17 10:44:32 +0000
committerGerrit Code Review <review@openstack.org>2022-03-17 10:44:32 +0000
commit0312ee67ee9f7e82afdad7ad361d72dfcd425dc6 (patch)
treeefc72f389ca4bce4d59c103de0902d19a71d945a /kolla/image
parentf212617276d251bd852f0d9d993727b88a9e034e (diff)
parentc9f93c30c1fa24e4949b2c34341cbbedf00421e9 (diff)
downloadkolla-0312ee67ee9f7e82afdad7ad361d72dfcd425dc6.tar.gz
kolla-0312ee67ee9f7e82afdad7ad361d72dfcd425dc6.zip
Merge "Add enabled flag for sources"
Diffstat (limited to 'kolla/image')
-rwxr-xr-xkolla/image/build.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/kolla/image/build.py b/kolla/image/build.py
index c9c2a60bd..583c22f18 100755
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -362,6 +362,10 @@ class BuildTask(DockerTask):
return followups
def process_source(self, image, source):
+ if not source['enabled']:
+ self.logger.debug("Skipping disabled source %s", source['name'])
+ return
+
dest_archive = os.path.join(image.path, source['name'] + '-archive')
if source.get('type') == 'url':
@@ -459,7 +463,8 @@ class BuildTask(DockerTask):
archive_path = self.process_source(image, item)
if image.status in STATUS_ERRORS:
raise ArchivingError
- archives.append(archive_path)
+ if archive_path:
+ archives.append(archive_path)
if archives:
for archive in archives:
with tarfile.open(archive, 'r') as archive_tar:
@@ -1207,6 +1212,7 @@ class KollaWorker(object):
installation['name'] = section
if installation['type'] == 'git':
installation['reference'] = self.conf[section]['reference']
+ installation['enabled'] = self.conf[section]['enabled']
return installation
all_sections = (set(self.conf._groups.keys()) |