workflows.garden.yml
next to your project configuration in your project root. You can also place your workflow definitions in your project root project.garden.yml
/garden.yml
file (with a ---
separator after the project configuration).garden run workflow <name>
, or have it trigger automatically via Garden Enterprise.workflow.envVars
field:skip
and when
optionsskip
and when
fields on workflow steps.skip
field is a boolean. If its value is true
, the step will be skipped, and the next step will be run as if the skipped step succeeded.when
field can be used with the following values:onSuccess
(default): This step will be run if all preceding steps succeeded or were skipped.onError
: This step will be run if a preceding step failed, or if its preceding step has when: onError
. If the next step has when: onError
, it will also be run. Otherwise, all subsequent steps are ignored. See below for more.always
: The step will always be run, regardless of whether any previous steps have failed.never
: The step will always be ignored, even if all previous steps succeeded. Note: Ignored steps don't show up in the command logs.onError
steps is to place them at the end of your workflow (which ensures that they're run if any step in your workflow fails):onError
steps to set up "error handling checkpoints" in your workflow.run task my-task
) fails in this workflow:onError
steps will be run, and all other steps will be skipped (except for the last one, since it has when: always
). This can be useful for rollback operations that are relevant only at certain points in the workflow.skip
and when
for even more flexibility. For example:name
on a step, to make it easier to reference:log
key for the full command or script log.feature/*
branch:${var.*}
or ${local.env.*}
keys as well.