summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordevcurmudgeon <paul.sherwood@codethink.co.uk>2018-02-16 12:36:37 +0000
committerdevcurmudgeon <paul.sherwood@codethink.co.uk>2018-02-16 12:36:37 +0000
commit1ae2a61783325dd4e54238c15b8dbac908d74e72 (patch)
tree6792c58a6cc61c82f0ea92ebf7308e61f23dc21b
parenta0e6232c8c89b3eb66da5f5759055703640bd991 (diff)
parentb7ee7f84c38061e926d46cfe1eb4c6faf2f50d1d (diff)
downloadybd-1ae2a61783325dd4e54238c15b8dbac908d74e72.tar.gz
Merge branch 'benbrown/deployment-dirs' into 'master'
Remove .build and .inst directories from deployment See merge request baserock/ybd!405
-rw-r--r--ybd/deployment.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ybd/deployment.py b/ybd/deployment.py
index a13d936..6afafe1 100644
--- a/ybd/deployment.py
+++ b/ybd/deployment.py
@@ -17,6 +17,7 @@
import os
from subprocess import call
import json
+import shutil
import app
import cache
import sandbox
@@ -48,6 +49,10 @@ def deploy_system(system_spec, parent_location=''):
deploy_defaults = system_spec.get('deploy-defaults')
with sandbox.setup(system):
+ # Clean up directories not required for deployment.
+ shutil.rmtree(system['checkout'])
+ shutil.rmtree(system['install'])
+
app.log(system, 'Extracting system artifact into', system['sandbox'])
with open(cache.get_cache(system), 'r') as artifact:
call(['tar', 'x', '--directory', system['sandbox']],