--watch|-wflag or when running
garden run task <task-name>command. This will run the task regardless of whether or not the result is cached.
garden get task-result <task-name>.
postgresqlHelm chart. The module has a task for initializing the database and another one for clearing it. In the example we use environment variables to set the password. Notice also that the tasks depend on the
postgresservice being deployed.
helm, allow you to extract artifacts after tasks have been run. This can be handy when you'd like to view reports or logs, or if you'd like a script (via a local
execmodule, for instance) to validate the output from a task.
artifactsfield on task configurations. For example, for the
containermodule, you can do something like this:
my-task, you can find the contents of the
reportdirectory in the task's container, locally under
disabled: truein the task configuration. You can also disable them conditionally using template strings. For example, to disable a
containermodule task for a specific environment, you could do something like this:
--varCLI flag to pass in values to the task. Here for example, we have a simple container task that can receive an argument via a variable:
execmodule type runs tasks locally in your shell. By default, the
execmodule type executes tasks in the Garden build directory (under
.garden/build/<module-name>). By setting
local: true, the tasks are executed in the module source directory instead.
serviceResourceneeds to be specified to determine the pod spec for the task pod. You can see the whole pod spec used in the reference docs for kubernetes and helm modules. Please note that the
readinessProbeare stripped from your pod spec. Health checks for your application might fail when the container is used for testing because the main process usually running in that container is replaced by the task command.