diff options
Diffstat (limited to 'kolla/cmd')
| -rwxr-xr-x | kolla/cmd/build.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py index d21109647..1bb8d8076 100755 --- a/kolla/cmd/build.py +++ b/kolla/cmd/build.py @@ -208,6 +208,16 @@ class WorkerThread(threading.Thread): with tarfile.open(dest_archive, 'w') as tar: tar.add(clone_dir, arcname=os.path.basename(clone_dir)) + elif source.get('type') == 'local': + LOG.debug("%s:Getting local archive from %s", image['name'], + source['source']) + if os.path.isdir(source['source']): + with tarfile.open(dest_archive, 'w') as tar: + tar.add(source['source'], + arcname=os.path.basename(source['source'])) + else: + shutil.copyfile(source['source'], dest_archive) + else: LOG.error("%s:Wrong source type '%s'", image['name'], source.get('type')) |
