Bug
Current behavior
To avoid cleaning up certain actions (e.g. PVCs) when in running garden cleanup deploy you can disable it under this command with: disabled: ${command.name == "cleanup deploy"}
E.g.:
kind: Deploy
name: my-deploy
type: kubernetes
disabled: ${command.name == "cleanup deploy"}
spec:
# ...
However, this does not seem to work when in dev mode (I running commands from the dev console). Presumably because the command name isn't resolved correctly.
Surprisingly, the following actually does work in dev mode:
kind: Run
name: my-run
type: exec
spec:
command: [/bin/sh, "-c", "echo 'command is ${command.name}'"]
That is, if you run run my-run in the dev console it prints command is run.
Expected behavior
It does not cleanup disabled actions.
Reproducible example
- Go to demo project
- Add
disabled: ${command.name == "cleanup deploy"} to e.g. the frontend Deploy action.
- Run
garden dev
- Run
cleanup deploy and observe it tries to clean up the frontend Deploy action.
Bug
Current behavior
To avoid cleaning up certain actions (e.g. PVCs) when in running
garden cleanup deployyou can disable it under this command with:disabled: ${command.name == "cleanup deploy"}E.g.:
However, this does not seem to work when in dev mode (I running commands from the dev console). Presumably because the command name isn't resolved correctly.
Surprisingly, the following actually does work in dev mode:
That is, if you run
run my-runin the dev console it printscommand is run.Expected behavior
It does not cleanup disabled actions.
Reproducible example
disabled: ${command.name == "cleanup deploy"}to e.g. thefrontendDeploy action.garden devcleanup deployand observe it tries to clean up thefrontendDeploy action.