diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-07-03 13:50:02 +0000 |
---|---|---|
committer | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-07-03 13:50:02 +0000 |
commit | 776d77012234fd14882116d6a767b82a21f9b089 (patch) | |
tree | 37f24af14083425a98e0af257fc289c970c25cb1 /scripts/edit-morph | |
parent | a82d6573794c45e3065100561698a86f9e3e610c (diff) | |
download | morph-776d77012234fd14882116d6a767b82a21f9b089.tar.gz |
Add a yarn test to test building and deploying a system with a chunk in definitionsbaserock/adamcoldrick/load-chunks-from-definitions-wip
Diffstat (limited to 'scripts/edit-morph')
-rwxr-xr-x | scripts/edit-morph | 12 |
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() |