summaryrefslogtreecommitdiff
path: root/morphlib/plugins/deploy_plugin.py
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2013-06-05 13:31:13 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2013-06-05 16:59:29 +0000
commitb4a633a5229b6c3380cde0cc67da037ea8091008 (patch)
treec5f61a51eedbf5600ac9bcaa0249ce422ead7e6e /morphlib/plugins/deploy_plugin.py
parent86cbc1bc8ef84dc9496d7723a15dec9b43eacb73 (diff)
downloadmorph-b4a633a5229b6c3380cde0cc67da037ea8091008.tar.gz
Change the structure of the temporary directory used by morph
Now, inside the temporary directory we will have the following subdirectories: chunks, staging, failed and deployments. The failed directory will contain the staging areas of failed builds.
Diffstat (limited to 'morphlib/plugins/deploy_plugin.py')
-rw-r--r--morphlib/plugins/deploy_plugin.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py
index 7a6f2b92..19c57640 100644
--- a/morphlib/plugins/deploy_plugin.py
+++ b/morphlib/plugins/deploy_plugin.py
@@ -128,7 +128,9 @@ class DeployPlugin(cliapp.Plugin):
# Unpack the artifact (tarball) to a temporary directory.
self.app.status(msg='Unpacking system for configuration')
- system_tree = tempfile.mkdtemp(dir=self.app.settings['tempdir'])
+ deployment_dir = os.path.join(self.app.settings['tempdir'],
+ 'deployments')
+ system_tree = tempfile.mkdtemp(dir=deployment_dir)
if build_command.lac.has(artifact):
f = build_command.lac.get(artifact)
@@ -157,7 +159,8 @@ class DeployPlugin(cliapp.Plugin):
if 'TMPDIR' not in env:
# morphlib.app already took care of ensuring the tempdir setting
# is good, so use it if we don't have one already set.
- env['TMPDIR'] = self.app.settings['tempdir']
+ env['TMPDIR'] = os.path.join(self.app.settings['tempdir'],
+ 'deployments')
# Run configuration extensions.
self.app.status(msg='Configure system')