diff options
| author | Zuul <zuul@review.opendev.org> | 2022-03-17 10:44:32 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2022-03-17 10:44:32 +0000 |
| commit | 0312ee67ee9f7e82afdad7ad361d72dfcd425dc6 (patch) | |
| tree | efc72f389ca4bce4d59c103de0902d19a71d945a /kolla/image | |
| parent | f212617276d251bd852f0d9d993727b88a9e034e (diff) | |
| parent | c9f93c30c1fa24e4949b2c34341cbbedf00421e9 (diff) | |
| download | kolla-0312ee67ee9f7e82afdad7ad361d72dfcd425dc6.tar.gz kolla-0312ee67ee9f7e82afdad7ad361d72dfcd425dc6.zip | |
Merge "Add enabled flag for sources"
Diffstat (limited to 'kolla/image')
| -rwxr-xr-x | kolla/image/build.py | 8 |
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()) | |
