summaryrefslogtreecommitdiff
path: root/scripts/edit-morph
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2014-07-03 13:50:02 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2014-07-04 08:35:25 +0000
commitbd03f8d3247add14922f81576a9a9f53ab840b01 (patch)
treec9f1e652463b0cc436260df43c32168561642e2b /scripts/edit-morph
parent30b23f51e4d85f265dbff8d0bb0ed7fce9f68606 (diff)
downloadmorph-bd03f8d3247add14922f81576a9a9f53ab840b01.tar.gz
yarns: Test building and deployment of a system with a chunk in definitionsbaserock/adamcoldrick/load-chunks-from-definitions
Diffstat (limited to 'scripts/edit-morph')
-rwxr-xr-xscripts/edit-morph12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/edit-morph b/scripts/edit-morph
index d0b793a4..9f576f74 100755
--- a/scripts/edit-morph
+++ b/scripts/edit-morph
@@ -249,6 +249,12 @@ class EditMorph(cliapp.Application):
with self._open_yaml(file_path) as d:
d['products'] = yaml.load(match_rules)
+ def cmd_edit_chunk_spec(self, (spec_name, stratum_file, key, value)):
+ with self._open_yaml(stratum_file) as stratum:
+ for spec in stratum['chunks']:
+ if spec['name'] == spec_name:
+ spec[key] = value
+
@classmethod
def _splice_cluster_system(cls, syslist, syspath):
sysname = syspath[0]
@@ -327,4 +333,10 @@ class EditMorph(cliapp.Application):
system = self._find_cluster_system(d['systems'], syspath)
system['deploy'][syspath[-1]][key] = val
+ def cmd_chunk_add_install_command(self, (chunk_file, command)):
+ with self._open_yaml(chunk_file) as chunk:
+ if not 'install-commands' in chunk:
+ chunk['install-commands'] = []
+ chunk['install-commands'].append(command)
+
EditMorph().run()