diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-03-10 16:06:29 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-03-14 10:54:55 +0000 |
commit | 439f278b2048ef20f7b0f953ed45feed50d73120 (patch) | |
tree | 362d1171262955a03179e0d83816cc3371f7a94c /yarns/implementations.yarn | |
parent | 8fd1da1a64fc48ccb070bcc52766a547c85cbecc (diff) | |
download | morph-439f278b2048ef20f7b0f953ed45feed50d73120.tar.gz |
Test nested deployments
Diffstat (limited to 'yarns/implementations.yarn')
-rw-r--r-- | yarns/implementations.yarn | 75 |
1 files changed, 54 insertions, 21 deletions
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index 71a782f3..e4f36399 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -675,27 +675,6 @@ them, so they can be added to the end of the implements section. if [ $MATCH_1 == "upgrades" ]; then run_morph "$@" else attempt_morph "$@"; fi -To successfully deploy systems, we need a cluster morphology. Since the -common case is to just have one system, we generate a stub morphology -with only the minimal information. - - IMPLEMENTS GIVEN a cluster called (\S+) for deploying only the (\S+) system as type (\S+) in system branch (\S+) - name="$MATCH_1" - system="$MATCH_2" - type="$MATCH_3" - branch="$MATCH_4" - cat << EOF > "$DATADIR/workspace/$branch/test/morphs/$name.morph" - name: $name - kind: cluster - systems: - - morph: $system - repo: test:morphs - ref: $branch - deploy: - $system: - type: $type - EOF - Implementations sections for reading error messages =================================================== @@ -817,7 +796,61 @@ Altering morphologies in their source repositories Altering morphologies in the workspace -------------------------------------- +### Altering strata ### + IMPLEMENTS GIVEN stratum (\S+) in system branch (\S+) has match rules: (.*) cd "$DATADIR/workspace/$MATCH_2/test/morphs" "$SRCDIR/scripts/edit-morph" set-stratum-match-rules \ "$MATCH_1.morph" "$MATCH_3" + +### Altering clusters ### + + IMPLEMENTS GIVEN a cluster called (\S+) in system branch (\S+) + name="$MATCH_1" + branch="$MATCH_2" + "$SRCDIR/scripts/edit-morph" cluster-init \ + "$DATADIR/workspace/$branch/test/morphs/$name.morph" + + IMPLEMENTS GIVEN a (sub)?system in cluster (\S+) in branch (\S+) called (\S+) + cluster="$MATCH_2" + branch="$MATCH_3" + name="$MATCH_4" + "$SRCDIR/scripts/edit-morph" cluster-system-init \ + "$DATADIR/workspace/$branch/test/morphs/$cluster.morph" "$name" + + IMPLEMENTS GIVEN (sub)?system (\S+) in cluster (\S+) in branch (\S+) builds (\S+) + name="$MATCH_2" + cluster="$MATCH_3" + branch="$MATCH_4" + morphology="$MATCH_5" + "$SRCDIR/scripts/edit-morph" cluster-system-set-morphology \ + "$DATADIR/workspace/$branch/test/morphs/$cluster.morph" "$name" \ + "$morphology" + + IMPLEMENTS GIVEN (sub)?system (\S+) in cluster (\S+) in branch (\S+) has deployment type: (\S+) + name="$MATCH_2" + cluster="$MATCH_3" + branch="$MATCH_4" + type="$MATCH_5" + "$SRCDIR/scripts/edit-morph" cluster-system-set-deploy-type \ + "$DATADIR/workspace/$branch/test/morphs/$cluster.morph" "$name" \ + "$type" + + IMPLEMENTS GIVEN (sub)?system (\S+) in cluster (\S+) in branch (\S+) has deployment location: (\S+) + name="$MATCH_2" + cluster="$MATCH_3" + branch="$MATCH_4" + location="$MATCH_5" + "$SRCDIR/scripts/edit-morph" cluster-system-set-deploy-location \ + "$DATADIR/workspace/$branch/test/morphs/$cluster.morph" "$name" \ + "$location" + + IMPLEMENTS GIVEN (sub)?system (\S+) in cluster (\S+) in branch (\S+) has deployment variable: ([^=]+)=(.*) + name="$MATCH_2" + cluster="$MATCH_3" + branch="$MATCH_4" + key="$MATCH_5" + val="$MATCH_6" + "$SRCDIR/scripts/edit-morph" cluster-system-set-deploy-variable \ + "$DATADIR/workspace/$branch/test/morphs/$cluster.morph" "$name" \ + "$key" "$val" |