Run tasks
Container
The container
Run and Test actions can be used for running one off jobs as a Pod using a given container image and similarly for running test. For example:
Helm Pod
This action type can be used for Run and Test actions where you already have the corresponding Helm charts. It's similar to thekubernetes-pod
action type.
See the helm-pod
Run and helm-pod
Test reference docs for more details.
Kubernetes Pod
For Run and Test actions, either the kubernetes-pod
or kubernetes-exec
action types can be used.
kubernetes-pod
Run
and kubernetes-pod
test will create a fresh Kubernetes workload and run your command in it.
These actions are cached. This means that Garden will not rerun them if the version of the action hasn't changed. If a remote Kubernetes
cluster is used, test results are stored there which allows to share test results between the team or CI runs to decrease the number or re-runs.
kubernetes-pod
actions don't have to depend on the deploy actions. The manifests are gathered from the kubernetes manifests and deployed to the cluster.
Kubernetes Exec
kubernetes-exec
Run andkubernetes-exec
Test actions are used to execute a command in an already deployed
Kubernetes Pod and wait for it to complete. These actions are not cached. They can be used with deploys running in sync mode
for rapid testing and development. These actions should depend on the deploy action that creates the kubernetes workloads they run in.
Here's a run action from the vote-helm example that initializes the database by running a command in the already deployed kubernetes workload.
Last updated
Was this helpful?