version: 2 env0.yaml schema introduces a change to how custom flow steps are configured and shown on env0 UI. These changes are reflected by:
- A new step schema, described here.
- Each custom step configured will be presented as a separate deployment step in env0 UI.
For example this env0.yaml:
version: 2 deploy: steps: terraformPlan: after: - name: Enforce Networking Policies run: ./enforce-networking-policies-script.sh env: FOO: bar
Would yield this deployment step list:
V1 String-Only Steps Backward Compatibility
version: 1schema steps used to be a list of strings, the new
version: 2schema keeps this syntax as backward compatible. The only difference is that now string-only steps will have their name originated by the command they execute. For example, if a step is configured as:
version: 2 deploy: steps: terraformPlan: after: - echo foo
then his custom deployment step name would be echo foo in env0 UI.
version: 2 steps are now configured as an
object, rather than a
object includes the following attributes:
name(Required) - The name of the step that would be shown in env0 UI.
run(Exactly one of
useis required) - The bash command/s to execute.
use(Exactly one of
useis required) - The GIT URL of the env0 plugin in the form of
objectcontaining a map of environment variables by key and value that will be available to the step. A reference to another environment variable value that's available to the deployment is achievable by prefixing the value with the
input(Relevant for plugins only) - An
objectof attributes that are required as inputs to the env0 plugin. Read more about it here.
Support for Multiline Strings
In case you'd like to include multiple bash commands under a single step, you can use the supported YAML multiline string syntax. Here's an example:
version: 2 deploy: steps: terraformPlan: after: - name: An Example of Multiline string run: | echo foo echo bar echo baz
In order to migrate from the
version: 1 schema and keep the same deployments step structure in env0 UI, you'll need to include minor changes to your
Here's an example of how to migrate such a file to
version: 1 deploy: steps: terraformPlan: after: - pip install jq - echo "Installed jq" - jq --help
version: 2 deploy: steps: terraformPlan: after: - name: "Terraform Plan: After" run: | pip install jq echo "Installed jq" jq --help
Updated 10 months ago