workflows.garden.ymlnext to your project configuration in your project root. You can also place your workflow definitions in your project root
garden.ymlfile (with a
---separator after the project configuration).
whenfields on workflow steps.
skipfield 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.
whenfield 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.
onErrorsteps is to place them at the end of your workflow (which ensures that they're run if any step in your workflow fails):
onErrorsteps to set up "error handling checkpoints" in your workflow.
run task my-task) fails in this workflow:
onErrorsteps 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.
whenfor even more flexibility. For example:
nameon a step, to make it easier to reference: