Below is the schema reference for the Project, Module and Workflow garden.yml
configuration files. For an introduction to configuring a Garden project, please look at our configuration guide.
The reference is divided into a few sections:
Project YAML schema contains the Project config YAML schema
Project configuration keys describes each individual schema key for Project configuration files.
Module YAML schema contains the Module config YAML schema
Module configuration keys describes each individual schema key for Module configuration files.
Workflow YAML schema contains the Workflow config YAML schema
Workflow configuration keys describes each individual schema key for Workflow configuration files.
Note that individual providers, e.g. kubernetes
, add their own project level configuration keys. The provider types are listed on the Providers page.
Likewise, individual module types, e.g. container
, add additional configuration keys at the module level. Module types are listed on the Module Types page.
Please refer to those for more details on provider and module configuration.
The values in the schema below are the default values.
# Indicate what kind of config this is.kind: Project# The name of the project.name:# A list of environments to configure for the project.environments:- # The name of the environment.name:# Set the default namespace to use. This can be templated to be user-specific, or to use an environment variable# (e.g. in CI).## You can also set this to `null`, in order to require an explicit namespace to be set on usage. This may be# advisable for shared environments, but you may also be able to achieve the desired result by templating this# field, as mentioned above.defaultNamespace: default# Flag the environment as a production environment.## Setting this flag to `true` will activate the protection on the `deploy`, `test`, `task`, `build`,# and `dev` commands. A protected command will ask for a user confirmation every time is run against# an environment marked as production.# Run the command with the "--yes" flag to skip the check (e.g. when running Garden in CI).## This flag is also passed on to every provider, and may affect how certain providers behave.# For more details please check the documentation for the providers in use.production: false# Specify a path (relative to the project root) to a file containing variables, that we apply on top of the# _environment-specific_ `variables` field.## The format of the files is determined by the configured file's extension:## * `.env` - Standard "dotenv" format, as defined by [dotenv](https://github.com/motdotla/dotenv#rules).# * `.yaml`/`.yml` - YAML. The file must consist of a YAML document, which must be a map (dictionary). Keys may# contain any value type.# * `.json` - JSON. Must contain a single JSON _object_ (not an array).## _NOTE: The default varfile format will change to YAML in Garden v0.13, since YAML allows for definition of# nested objects and arrays._## If you don't set the field and the `garden.<env-name>.env` file does not exist,# we simply ignore it. If you do override the default value and the file doesn't exist, an error will be thrown.varfile:# A key/value map of variables that modules can reference when using this environment. These take precedence over# variables defined in the top-level `variables` field, but may also reference the top-level variables in template# strings.variables: {}# A list of providers that should be used for this project, and their configuration. Please refer to individual# plugins/providers for details on how to configure them.providers:- # The name of the provider plugin to use.name:# List other providers that should be resolved before this one.dependencies: []# If specified, this provider will only be used in the listed environments. Note that an empty array effectively# disables the provider. To use a provider in all environments, omit this field.environments:# The default environment to use when calling commands without the `--env` parameter. May include a namespace name, in# the format `<namespace>.<environment>`. Defaults to the first configured environment, with no namespace set.defaultEnvironment: ''# Specify a list of filenames that should be used as ".ignore" files across the project, using the same syntax and# semantics as `.gitignore` files. By default, patterns matched in `.gardenignore` files, found anywhere in the# project, are ignored when scanning for modules and module sources (Note: prior to version 0.12.0, `.gitignore` files# were also used by default).# Note that these take precedence over the project `module.include` field, and module `include` fields, so any paths# matched by the .ignore files will be ignored even if they are explicitly specified in those fields.# See the [Configuration Files# guide](https://docs.garden.io/using-garden/configuration-overview#including-excluding-files-and-directories) for# details.dotIgnoreFiles:- .gardenignore# Control where to scan for modules in the project.modules:# Specify a list of POSIX-style paths or globs that should be scanned for Garden modules.## Note that you can also _exclude_ path using the `exclude` field or by placing `.gardenignore` files in your source# tree, which use the same format as `.gitignore` files. See the [Configuration Files# guide](https://docs.garden.io/using-garden/configuration-overview#including-excluding-files-and-directories) for# details.## Unlike the `exclude` field, the paths/globs specified here have _no effect_ on which files and directories Garden# watches for changes. Use the `exclude` field to affect those, if you have large directories that should not be# watched for changes.## Also note that specifying an empty list here means _no paths_ should be included.include:# Specify a list of POSIX-style paths or glob patterns that should be excluded when scanning for modules.## The filters here also affect which files and directories are watched for changes. So if you have a large number of# directories in your project that should not be watched, you should specify them here.## For example, you might want to exclude large vendor directories in your project from being scanned and watched, by# setting `exclude: [node_modules/**/*, vendor/**/*]`.## Note that you can also explicitly _include_ files using the `include` field. If you also specify the `include`# field, the paths/patterns specified here are filtered from the files matched by `include`.## The `include` field does _not_ affect which files are watched.## See the [Configuration Files# guide](https://docs.garden.io/using-garden/configuration-overview#including-excluding-files-and-directories) for# details.exclude:# A list of output values that the project should export. These are exported by the `garden get outputs` command, as# well as when referencing a project as a sub-project within another project.## You may use any template strings to specify the values, including references to provider outputs, module# outputs and runtime outputs. For a full reference, see the [Output configuration# context](https://docs.garden.io/reference/template-strings#output-configuration-context) section in the Template# String Reference.## Note that if any runtime outputs are referenced, the referenced services and tasks will be deployed and run if# necessary when resolving the outputs.outputs:- # The name of the output value.name:# The value for the output. Must be a primitive (string, number, boolean or null). May also be any valid template# string.value:# A list of remote sources to import into project.sources:- # The name of the source to importname:# A remote repository URL. Currently only supports git servers. Must contain a hash suffix pointing to a specific# branch or tag, with the format: <git remote url>#<branch|tag>repositoryUrl:# Specify a path (relative to the project root) to a file containing variables, that we apply on top of the# project-wide `variables` field.## The format of the files is determined by the configured file's extension:## * `.env` - Standard "dotenv" format, as defined by [dotenv](https://github.com/motdotla/dotenv#rules).# * `.yaml`/`.yml` - YAML. The file must consist of a YAML document, which must be a map (dictionary). Keys may# contain any value type.# * `.json` - JSON. Must contain a single JSON _object_ (not an array).## _NOTE: The default varfile format will change to YAML in Garden v0.13, since YAML allows for definition of nested# objects and arrays._## If you don't set the field and the `garden.env` file does not exist, we simply ignore it.# If you do override the default value and the file doesn't exist, an error will be thrown.## _Note that in many cases it is advisable to only use environment-specific var files, instead of combining# multiple ones. See the `environments[].varfile` field for this option._varfile: garden.env# Key/value map of variables to configure for all environments. Keys may contain letters and numbers. Any values are# permitted, including arrays and objects of any nesting.variables: {}
Indicate what kind of config this is.
Type | Allowed Values | Default | Required |
| "Project" |
| Yes |
The name of the project.
Type | Required |
| Yes |
Example:
name: "my-sweet-project"
A list of environments to configure for the project.
Type | Required |
| No |
environments > name
The name of the environment.
Type | Required |
| Yes |
Example:
environments:- name: "dev"
environments > defaultNamespace
Set the default namespace to use. This can be templated to be user-specific, or to use an environment variable (e.g. in CI).
You can also set this to null
, in order to require an explicit namespace to be set on usage. This may be advisable for shared environments, but you may also be able to achieve the desired result by templating this field, as mentioned above.
Type | Default | Required |
|
| No |
Example:
environments:- defaultNamespace: "user-${local.username}"
environments > production
Flag the environment as a production environment.
Setting this flag to true
will activate the protection on the deploy
, test
, task
, build
, and dev
commands. A protected command will ask for a user confirmation every time is run against an environment marked as production. Run the command with the "--yes" flag to skip the check (e.g. when running Garden in CI).
This flag is also passed on to every provider, and may affect how certain providers behave. For more details please check the documentation for the providers in use.
Type | Default | Required |
|
| No |
Example:
environments:- production: true
environments > providers
DEPRECATED - Please use the top-level providers
field instead, and if needed use the environments
key on the provider configurations to limit them to specific environments.
Type | Default | Required |
|
| No |
environments > providers > name
The name of the provider plugin to use.
Type | Required |
| Yes |
Example:
environments:
environments > providers > dependencies
List other providers that should be resolved before this one.
Type | Default | Required |
|
| No |
Example:
environments:
environments > providers > environments
If specified, this provider will only be used in the listed environments. Note that an empty array effectively disables the provider. To use a provider in all environments, omit this field.
Type | Required |
| No |
Example:
environments:
environments > varfile
Specify a path (relative to the project root) to a file containing variables, that we apply on top of the environment-specific variables
field.
The format of the files is determined by the configured file's extension:
.env
- Standard "dotenv" format, as defined by dotenv.
.yaml
/.yml
- YAML. The file must consist of a YAML document, which must be a map (dictionary). Keys may contain any value type.
.json
- JSON. Must contain a single JSON object (not an array).
NOTE: The default varfile format will change to YAML in Garden v0.13, since YAML allows for definition of nested objects and arrays.
If you don't set the field and the garden.<env-name>.env
file does not exist, we simply ignore it. If you do override the default value and the file doesn't exist, an error will be thrown.
Type | Required |
| No |
Example:
environments:- varfile: "custom.env"
environments > variables
A key/value map of variables that modules can reference when using this environment. These take precedence over variables defined in the top-level variables
field, but may also reference the top-level variables in template strings.
Type | Default | Required |
|
| No |
A list of providers that should be used for this project, and their configuration. Please refer to individual plugins/providers for details on how to configure them.
Type | Default | Required |
|
| No |
providers > name
The name of the provider plugin to use.
Type | Required |
| Yes |
Example:
providers:- name: "local-kubernetes"
providers > dependencies
List other providers that should be resolved before this one.
Type | Default | Required |
|
| No |
Example:
providers:- dependencies:- exec
providers > environments
If specified, this provider will only be used in the listed environments. Note that an empty array effectively disables the provider. To use a provider in all environments, omit this field.
Type | Required |
| No |
Example:
providers:- environments:- dev- stage
The default environment to use when calling commands without the --env
parameter. May include a namespace name, in the format <namespace>.<environment>
. Defaults to the first configured environment, with no namespace set.
Type | Default | Required |
|
| No |
Example:
defaultEnvironment: "dev"
Specify a list of filenames that should be used as ".ignore" files across the project, using the same syntax and semantics as .gitignore
files. By default, patterns matched in .gardenignore
files, found anywhere in the project, are ignored when scanning for modules and module sources (Note: prior to version 0.12.0, .gitignore
files were also used by default). Note that these take precedence over the project module.include
field, and module include
fields, so any paths matched by the .ignore files will be ignored even if they are explicitly specified in those fields. See the Configuration Files guide for details.
Type | Default | Required |
|
| No |
Example:
dotIgnoreFiles:- .gardenignore- .gitignore
Control where to scan for modules in the project.
Type | Required |
| No |
modules > include
Specify a list of POSIX-style paths or globs that should be scanned for Garden modules.
Note that you can also exclude path using the exclude
field or by placing .gardenignore
files in your source tree, which use the same format as .gitignore
files. See the Configuration Files guide for details.
Unlike the exclude
field, the paths/globs specified here have no effect on which files and directories Garden watches for changes. Use the exclude
field to affect those, if you have large directories that should not be watched for changes.
Also note that specifying an empty list here means no paths should be included.
Type | Required |
| No |
Example:
modules:...include:- modules/**/*
modules > exclude
Specify a list of POSIX-style paths or glob patterns that should be excluded when scanning for modules.
The filters here also affect which files and directories are watched for changes. So if you have a large number of directories in your project that should not be watched, you should specify them here.
For example, you might want to exclude large vendor directories in your project from being scanned and watched, by setting exclude: [node_modules/**/*, vendor/**/*]
.
Note that you can also explicitly include files using the include
field. If you also specify the include
field, the paths/patterns specified here are filtered from the files matched by include
.
The include
field does not affect which files are watched.
See the Configuration Files guide for details.
Type | Required |
| No |
Example:
modules:...exclude:- public/**/*- tmp/**/*
A list of output values that the project should export. These are exported by the garden get outputs
command, as well as when referencing a project as a sub-project within another project.
You may use any template strings to specify the values, including references to provider outputs, module outputs and runtime outputs. For a full reference, see the Output configuration context section in the Template String Reference.
Note that if any runtime outputs are referenced, the referenced services and tasks will be deployed and run if necessary when resolving the outputs.
Type | Default | Required |
|
| No |
outputs > name
The name of the output value.
Type | Required |
| Yes |
Example:
outputs:- name: "my-output-key"
outputs > value
The value for the output. Must be a primitive (string, number, boolean or null). May also be any valid template string.
Type | Required | | |
`number | string | boolean` | Yes |
Example:
outputs:- value: "${modules.my-module.outputs.some-output}"
A list of remote sources to import into project.
Type | Default | Required |
|
| No |
sources > name
The name of the source to import
Type | Required |
| Yes |
Example:
sources:- name: "my-external-repo"
sources > repositoryUrl
A remote repository URL. Currently only supports git servers. Must contain a hash suffix pointing to a specific branch or tag, with the format: #
Type | Required | |
`gitUrl | string` | Yes |
Example:
sources:- repositoryUrl: "git+https://github.com/org/repo.git#v2.0"
Specify a path (relative to the project root) to a file containing variables, that we apply on top of the project-wide variables
field.
The format of the files is determined by the configured file's extension:
.env
- Standard "dotenv" format, as defined by dotenv.
.yaml
/.yml
- YAML. The file must consist of a YAML document, which must be a map (dictionary). Keys may contain any value type.
.json
- JSON. Must contain a single JSON object (not an array).
NOTE: The default varfile format will change to YAML in Garden v0.13, since YAML allows for definition of nested objects and arrays.
If you don't set the field and the garden.env
file does not exist, we simply ignore it. If you do override the default value and the file doesn't exist, an error will be thrown.
Note that in many cases it is advisable to only use environment-specific var files, instead of combining multiple ones. See the environments[].varfile
field for this option.
Type | Default | Required |
|
| No |
Example:
varfile: "custom.env"
Key/value map of variables to configure for all environments. Keys may contain letters and numbers. Any values are permitted, including arrays and objects of any nesting.
Type | Default | Required |
|
| No |
# The schema version of this config (currently not used).apiVersion: garden.io/v0kind: Module# The type of this module.type:# The name of this module.name:# Specify how to build the module. Note that plugins may define additional keys on this object.build:# A list of modules that must be built before this module is built.dependencies:- # Module name to build ahead of this module.name:# Specify one or more files or directories to copy from the built dependency to this module.copy:- # POSIX-style path or filename of the directory or file(s) to copy to the target.source:# POSIX-style path or filename to copy the directory or file(s), relative to the build directory.# Defaults to to same as source path.target: ''# A description of the module.description:# Set this to `true` to disable the module. You can use this with conditional template strings to disable modules# based on, for example, the current environment or other variables (e.g. `disabled: \${environment.name == "prod"}`).# This can be handy when you only need certain modules for specific environments, e.g. only for development.## Disabling a module means that any services, tasks and tests contained in it will not be deployed or run. It also# means that the module is not built _unless_ it is declared as a build dependency by another enabled module (in which# case building this module is necessary for the dependant to be built).## If you disable the module, and its services, tasks or tests are referenced as _runtime_ dependencies, Garden will# automatically ignore those dependency declarations. Note however that template strings referencing the module's# service or task outputs (i.e. runtime outputs) will fail to resolve when the module is disabled, so you need to make# sure to provide alternate values for those if you're using them, using conditional expressions.disabled: false# Specify a list of POSIX-style paths or globs that should be regarded as the source files for this module. Files that# do *not* match these paths or globs are excluded when computing the version of the module, when responding to# filesystem watch events, and when staging builds.## Note that you can also _exclude_ files using the `exclude` field or by placing `.gardenignore` files in your source# tree, which use the same format as `.gitignore` files. See the [Configuration Files# guide](https://docs.garden.io/using-garden/configuration-overview#including-excluding-files-and-directories) for# details.## Also note that specifying an empty list here means _no sources_ should be included.include:# Specify a list of POSIX-style paths or glob patterns that should be excluded from the module. Files that match these# paths or globs are excluded when computing the version of the module, when responding to filesystem watch events,# and when staging builds.## Note that you can also explicitly _include_ files using the `include` field. If you also specify the `include`# field, the files/patterns specified here are filtered from the files matched by `include`. See the [Configuration# Files guide](https://docs.garden.io/using-garden/configuration-overview#including-excluding-files-and-directories)# for details.## Unlike the `modules.exclude` field in the project config, the filters here have _no effect_ on which files and# directories are watched for changes. Use the project `modules.exclude` field to affect those, if you have large# directories that should not be watched for changes.exclude:# A remote repository URL. Currently only supports git servers. Must contain a hash suffix pointing to a specific# branch or tag, with the format: <git remote url>#<branch|tag>## Garden will import the repository source code into this module, but read the module's config from the local# garden.yml file.repositoryUrl:# When false, disables pushing this module to remote registries.allowPublish: true# A list of files to write to the module directory when resolving this module. This is useful to automatically# generate (and template) any supporting files needed for the module.generateFiles:- # POSIX-style filename to read the source file contents from, relative to the path of the ModuleTemplate# configuration file.# This file may contain template strings, much like any other field in the configuration.sourcePath:# POSIX-style filename to write the resolved file contents to, relative to the path of the Bundle that references# the template.## Note that any existing file with the same name will be overwritten. If the path contains one or more# directories, they will be automatically created if missing.targetPath:# The desired file contents as a string.value:
The schema version of this config (currently not used).
Type | Allowed Values | Default | Required |
| "garden.io/v0" |
| Yes |
Type | Allowed Values | Default | Required |
| "Module" |
| Yes |
The type of this module.
Type | Required |
| Yes |
Example:
type: "container"
The name of this module.
Type | Required |
| Yes |
Example:
name: "my-sweet-module"
Specify how to build the module. Note that plugins may define additional keys on this object.
Type | Default | Required |
|
| No |
build > dependencies
A list of modules that must be built before this module is built.
Type | Default | Required |
|
| No |
Example:
build:...dependencies:- name: some-other-module-name
build > dependencies > name
Module name to build ahead of this module.
Type | Required |
| Yes |
build > dependencies > copy
Specify one or more files or directories to copy from the built dependency to this module.
Type | Default | Required |
|
| No |
build > dependencies > copy > source
POSIX-style path or filename of the directory or file(s) to copy to the target.
Type | Required |
| Yes |
build > dependencies > copy > target
POSIX-style path or filename to copy the directory or file(s), relative to the build directory. Defaults to to same as source path.
Type | Default | Required |
|
| No |
A description of the module.
Type | Required |
| No |
Set this to true
to disable the module. You can use this with conditional template strings to disable modules based on, for example, the current environment or other variables (e.g. disabled: \${environment.name == "prod"}
). This can be handy when you only need certain modules for specific environments, e.g. only for development.
Disabling a module means that any services, tasks and tests contained in it will not be deployed or run. It also means that the module is not built unless it is declared as a build dependency by another enabled module (in which case building this module is necessary for the dependant to be built).
If you disable the module, and its services, tasks or tests are referenced as runtime dependencies, Garden will automatically ignore those dependency declarations. Note however that template strings referencing the module's service or task outputs (i.e. runtime outputs) will fail to resolve when the module is disabled, so you need to make sure to provide alternate values for those if you're using them, using conditional expressions.
Type | Default | Required |
|
| No |
Specify a list of POSIX-style paths or globs that should be regarded as the source files for this module. Files that do not match these paths or globs are excluded when computing the version of the module, when responding to filesystem watch events, and when staging builds.
Note that you can also exclude files using the exclude
field or by placing .gardenignore
files in your source tree, which use the same format as .gitignore
files. See the Configuration Files guide for details.
Also note that specifying an empty list here means no sources should be included.
Type | Required |
| No |
Example:
include:- Dockerfile- my-app.js
Specify a list of POSIX-style paths or glob patterns that should be excluded from the module. Files that match these paths or globs are excluded when computing the version of the module, when responding to filesystem watch events, and when staging builds.
Note that you can also explicitly include files using the include
field. If you also specify the include
field, the files/patterns specified here are filtered from the files matched by include
. See the Configuration Files guide for details.
Unlike the modules.exclude
field in the project config, the filters here have no effect on which files and directories are watched for changes. Use the project modules.exclude
field to affect those, if you have large directories that should not be watched for changes.
Type | Required |
| No |
Example:
exclude:- tmp/**/*- '*.log'
A remote repository URL. Currently only supports git servers. Must contain a hash suffix pointing to a specific branch or tag, with the format: #
Garden will import the repository source code into this module, but read the module's config from the local garden.yml file.
Type | Required | |
`gitUrl | string` | No |
Example:
repositoryUrl: "git+https://github.com/org/repo.git#v2.0"
When false, disables pushing this module to remote registries.
Type | Default | Required |
|
| No |
A list of files to write to the module directory when resolving this module. This is useful to automatically generate (and template) any supporting files needed for the module.
Type | Required |
| No |
generateFiles > sourcePath
POSIX-style filename to read the source file contents from, relative to the path of the ModuleTemplate configuration file. This file may contain template strings, much like any other field in the configuration.
Type | Required |
| No |
generateFiles > targetPath
POSIX-style filename to write the resolved file contents to, relative to the path of the Bundle that references the template.
Note that any existing file with the same name will be overwritten. If the path contains one or more directories, they will be automatically created if missing.
Type | Required |
| Yes |
generateFiles > value
The desired file contents as a string.
Type | Required |
| No |
# The schema version of this workflow's config (currently not used).apiVersion: garden.io/v0kind: Workflow# The name of this workflow.name:# A description of the workflow.description:# A list of files to write before starting the workflow.## This is useful to e.g. create files required for provider authentication, and can be created from data stored in# secrets or templated strings.## Note that you cannot reference provider configuration in template strings within this field, since they are resolved# after these files are generated. This means you can reference the files specified here in your provider# configurations.files:- # POSIX-style path to write the file to, relative to the project root (or absolute). If the path contains one# or more directories, they are created automatically if necessary.# If any of those directories conflict with existing file paths, or if the file path conflicts with an existing# directory path, an error will be thrown.# **Any existing file with the same path will be overwritten, so be careful not to accidentally accidentally# overwrite files unrelated to your workflow.**path:# The file data as a string.data:# The name of a Garden secret to copy the file data from (Garden Enterprise only).secretName:# The number of hours to keep the workflow pod running after completion.keepAliveHours: 48limits:# The maximum amount of CPU the workflow pod can use, in millicpus (i.e. 1000 = 1 CPU)cpu: 1000# The maximum amount of RAM the workflow pod can use, in megabytes (i.e. 1024 = 1 GB)memory: 1024# The steps the workflow should run. At least one step is required. Steps are run sequentially. If a step fails,# subsequent steps are skipped.steps:- # An identifier to assign to this step. If none is specified, this defaults to "step-<number of step>", where# <number of step> is the sequential number of the step (first step being number 1).## This identifier is useful when referencing command outputs in following steps. For example, if you set this# to "my-step", following steps can reference the \${steps.my-step.outputs.*} key in the `script` or `command`# fields.name:# A Garden command this step should run, followed by any required or optional arguments and flags.# Arguments and options for the commands may be templated, including references to previous steps, but for now# the commands themselves (as listed below) must be hard-coded.## Supported commands:## `[build]`# `[delete, environment]`# `[delete, service]`# `[deploy]`# `[exec]`# `[get, config]`# `[get, outputs]`# `[get, status]`# `[get, task-result]`# `[get, test-result]`# `[link, module]`# `[link, source]`# `[publish]`# `[run, task]`# `[run, test]`# `[test]`# `[update-remote, all]`# `[update-remote, modules]`# `[update-remote, sources]`##command:# A description of the workflow step.description:# A bash script to run. Note that the host running the workflow must have bash installed and on path.# It is considered to have run successfully if it returns an exit code of 0. Any other exit code signals an error,# and the remainder of the workflow is aborted.## The script may include template strings, including references to previous steps.script:# Set to true to skip this step. Use this with template conditionals to skip steps for certain environments or# scenarios.skip: false# A list of triggers that determine when the workflow should be run, and which environment should be used (Garden# Enterprise only).triggers:- # The environment name (from your project configuration) to use for the workflow when matched by this trigger.environment:# The namespace to use for the workflow when matched by this trigger. Follows the namespacing setting used for# this trigger's environment, as defined in your project's environment configs.namespace:# A list of [GitHub events](https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads)# that should trigger this workflow.## Supported events:## `create`, `pull-request`, `pull-request-closed`, `pull-request-created`, `pull-request-opened`,# `pull-request-updated`, `push`, `release`, `release-created`, `release-deleted`, `release-edited`,# `release-prereleased`, `release-published`, `release-unpublished`##events:# If specified, only run the workflow for branches matching one of these filters.branches:# If specified, only run the workflow for tags matching one of these filters.tags:# If specified, do not run the workflow for branches matching one of these filters.ignoreBranches:# If specified, do not run the workflow for tags matching one of these filters.ignoreTags:
The schema version of this workflow's config (currently not used).
Type | Allowed Values | Default | Required |
| "garden.io/v0" |
| Yes |
Type | Allowed Values | Default | Required |
| "Workflow" |
| Yes |
The name of this workflow.
Type | Required |
| Yes |
Example:
name: "my-workflow"
A description of the workflow.
Type | Required |
| No |
A list of files to write before starting the workflow.
This is useful to e.g. create files required for provider authentication, and can be created from data stored in secrets or templated strings.
Note that you cannot reference provider configuration in template strings within this field, since they are resolved after these files are generated. This means you can reference the files specified here in your provider configurations.
Type | Required |
| No |
files > path
POSIX-style path to write the file to, relative to the project root (or absolute). If the path contains one or more directories, they are created automatically if necessary. If any of those directories conflict with existing file paths, or if the file path conflicts with an existing directory path, an error will be thrown. Any existing file with the same path will be overwritten, so be careful not to accidentally accidentally overwrite files unrelated to your workflow.
Type | Required |
| No |
Example:
files:- path: ".auth/kubeconfig.yaml"
files > data
The file data as a string.
Type | Required |
| No |
files > secretName
The name of a Garden secret to copy the file data from (Garden Enterprise only).
Type | Required |
| No |
The number of hours to keep the workflow pod running after completion.
Type | Default | Required |
|
| No |
Type | Default | Required |
|
| No |
limits > cpu
The maximum amount of CPU the workflow pod can use, in millicpus (i.e. 1000 = 1 CPU)
Type | Default | Required |
|
| No |
limits > memory
The maximum amount of RAM the workflow pod can use, in megabytes (i.e. 1024 = 1 GB)
Type | Default | Required |
|
| No |
The steps the workflow should run. At least one step is required. Steps are run sequentially. If a step fails, subsequent steps are skipped.
Type | Required |
| Yes |
steps > name
An identifier to assign to this step. If none is specified, this defaults to "step-", where
is the sequential number of the step (first step being number 1).
This identifier is useful when referencing command outputs in following steps. For example, if you set this to "my-step", following steps can reference the ${steps.my-step.outputs.*} key in the script
or command
fields.
Type | Required |
| No |
steps > command
A Garden command this step should run, followed by any required or optional arguments and flags. Arguments and options for the commands may be templated, including references to previous steps, but for now the commands themselves (as listed below) must be hard-coded.
Supported commands:
[build]
[delete, environment]
[delete, service]
[deploy]
[exec]
[get, config]
[get, outputs]
[get, status]
[get, task-result]
[get, test-result]
[link, module]
[link, source]
[publish]
[run, task]
[run, test]
[test]
[update-remote, all]
[update-remote, modules]
[update-remote, sources]
Type | Required |
| No |
Example:
steps:- command:- run- task- my-task
steps > description
A description of the workflow step.
Type | Required |
| No |
steps > script
A bash script to run. Note that the host running the workflow must have bash installed and on path. It is considered to have run successfully if it returns an exit code of 0. Any other exit code signals an error, and the remainder of the workflow is aborted.
The script may include template strings, including references to previous steps.
Type | Required |
| No |
steps > skip
Set to true to skip this step. Use this with template conditionals to skip steps for certain environments or scenarios.
Type | Default | Required |
|
| No |
Example:
steps:- skip: "${environment.name != 'prod'}"
A list of triggers that determine when the workflow should be run, and which environment should be used (Garden Enterprise only).
Type | Required |
| No |
triggers > environment
The environment name (from your project configuration) to use for the workflow when matched by this trigger.
Type | Required |
| Yes |
triggers > namespace
The namespace to use for the workflow when matched by this trigger. Follows the namespacing setting used for this trigger's environment, as defined in your project's environment configs.
Type | Required |
| No |
triggers > events
A list of GitHub events that should trigger this workflow.
Supported events:
create
, pull-request
, pull-request-closed
, pull-request-created
, pull-request-opened
, pull-request-updated
, push
, release
, release-created
, release-deleted
, release-edited
, release-prereleased
, release-published
, release-unpublished
Type | Required |
| No |
triggers > branches
If specified, only run the workflow for branches matching one of these filters.
Type | Required |
| No |
triggers > tags
If specified, only run the workflow for tags matching one of these filters.
Type | Required |
| No |
triggers > ignoreBranches
If specified, do not run the workflow for branches matching one of these filters.
Type | Required |
| No |
triggers > ignoreTags
If specified, do not run the workflow for tags matching one of these filters.
Type | Required |
| No |