summaryrefslogtreecommitdiff
path: root/yarns/implementations.yarn
diff options
context:
space:
mode:
Diffstat (limited to 'yarns/implementations.yarn')
-rw-r--r--yarns/implementations.yarn13
1 files changed, 13 insertions, 0 deletions
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
index 66d47bfd..651c0748 100644
--- a/yarns/implementations.yarn
+++ b/yarns/implementations.yarn
@@ -657,6 +657,16 @@ them, so they can be added to the end of the implements section.
if [ $MATCH_1 == "deploys" ]; then run_morph "$@"
else attempt_morph "$@"; fi
+ IMPLEMENTS WHEN the user (attempts to deploy|deploys) the following systems from cluster (\S+) in branch (\S+): (.*)
+ cd "$DATADIR/workspace/$MATCH_3"
+ set -- deploy "$MATCH_2"
+ if [ "$MATCH_4" != '' ]; then
+ # eval used so word splitting in the text is preserved
+ eval set -- '"$@"' $MATCH_4
+ fi
+ if [ $MATCH_1 == "deploys" ]; then run_morph "$@"
+ else attempt_morph "$@"; fi
+
IMPLEMENTS WHEN the user (attempts to upgrade|upgrades) the (system|cluster) (\S+) in branch (\S+)( with options (.*))?
cd "$DATADIR/workspace/$MATCH_4"
set -- deploy --upgrade "$MATCH_3"
@@ -712,6 +722,9 @@ Check attributes of a file on the filesystem
IMPLEMENTS THEN file (\S+) exists
test -e "$DATADIR/$MATCH_1"
+ IMPLEMENTS THEN file (\S+) does not exist
+ test ! -e "$DATADIR/$MATCH_1"
+
IMPLEMENTS THEN file (\S+) has permissions (\S+)
stat -c %A "$DATADIR/$MATCH_1" | grep -Fx -e "$MATCH_2"