Skip to content

Commit

Permalink
fix: add tests for config contexts (TBS)
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Jun 24, 2020
1 parent d637b36 commit 48bb1af
Show file tree
Hide file tree
Showing 13 changed files with 431 additions and 106 deletions.
6 changes: 3 additions & 3 deletions docs/reference/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ Examples:

### garden get status

Outputs the status of your environment.
Outputs the full status of your environment.


##### Usage
Expand Down Expand Up @@ -735,8 +735,8 @@ This can be useful for debugging tests, particularly integration/end-to-end test

Examples:

garden run test my-module integ # run the test named 'integ' in my-module
garden run test my-module integ --interactive=false # do not attach to the test run, just output results when completed
garden run test my-module integ # run the test named 'integ' in my-module
garden run test my-module integ --interactive=false # do not attach to the test run, just output results when completed

##### Usage

Expand Down
83 changes: 67 additions & 16 deletions docs/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -961,25 +961,41 @@ limits:
# 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:
- # A Garden command this step should run.
- # 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.
Expand All @@ -988,6 +1004,7 @@ steps:
# 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:

# A list of triggers that determine when the workflow should be run, and which environment should be used (Garden
Expand Down Expand Up @@ -1145,34 +1162,67 @@ The steps the workflow should run. At least one step is required. Steps are run
| --------------- | -------- |
| `array[object]` | Yes |

### `steps[].name`

[steps](#steps) > name

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.

| Type | Required |
| -------- | -------- |
| `string` | No |

### `steps[].command[]`

[steps](#steps) > command

A Garden command this step should run.
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 |
| --------------- | -------- |
| `array[string]` | No |

Example:

```yaml
steps:
- command:
- run
- task
- my-task
```

### `steps[].description`

[steps](#steps) > description
Expand All @@ -1188,6 +1238,7 @@ A description of the workflow step.
[steps](#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 |
| -------- | -------- |
Expand Down
Loading

0 comments on commit 48bb1af

Please sign in to comment.