-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into i4k-prepare-release-v0.4.4
- Loading branch information
Showing
12 changed files
with
334 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: terramate script info - Command | ||
description: The script info command gives you information about a script | ||
|
||
prev: | ||
text: 'Run' | ||
link: '/cli/cmdline/run' | ||
|
||
next: | ||
text: 'Script List' | ||
link: '/cli/cmdline/script/list' | ||
--- | ||
|
||
# Script Info | ||
|
||
**Note:** This is an experimental command that is likely subject to change in the future. | ||
|
||
The `script info LABEL...` command lists details about all script definitions matching the given LABELs (see [script run](./run) command for details about matching labels). The information provided by `script info` includes: | ||
|
||
| Name | Meaning | | ||
| ----------- | --------------------------------------------------------------------------- | | ||
| Definition | Where the script is defined | | ||
| Description | The description attribute in the script | | ||
| Stacks | The stacks within the scope of the script (i.e. those stacks it can run on) | | ||
| Jobs | The commands that comprise the script | | ||
|
||
This information is always relative to the current directory (or the value of `-C`). | ||
|
||
**Note: ** Scripts with the same name that are overridden in child directories are considered separate scripts. | ||
|
||
## Usage | ||
|
||
`terramate experimental script info LABEL...` | ||
|
||
## Examples | ||
|
||
Show information about a script called "deploy" defined at /scripts.tm.hcl | ||
|
||
```bash | ||
$ terramate experimental script info deploy | ||
Definition: /scripts.tm.hcl:1,1-8,2 | ||
Description: dummy deploy | ||
Stacks: | ||
/dev/ec2 | ||
/prd/ec2 | ||
/stg/ec2 | ||
Jobs: | ||
* ["echo","deploying ${global.env}"] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: terramate script list - Command | ||
description: The script list command shows a list of scripts that can be run in the current directory | ||
|
||
prev: | ||
text: 'Script Info' | ||
link: '/cli/cmdline/script/info' | ||
|
||
next: | ||
text: 'Script Run' | ||
link: '/cli/cmdline/script/run' | ||
--- | ||
|
||
# Script List | ||
|
||
**Note:** This is an experimental command that is likely subject to change in the future. | ||
|
||
Shows a list of all uniquely-named scripts that can be executed with `script run` in the current directory. If there are multiple definitions with the same name, a parent is selected over a child, or a first sibling over a later sibling (ordered by directory name). | ||
|
||
## Usage | ||
|
||
`terramate experimental script list` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
title: terramate script run - Command | ||
description: With the terramate | ||
|
||
prev: | ||
text: 'Script List' | ||
link: '/cli/cmdline/script/list' | ||
|
||
next: | ||
text: 'Script Tree' | ||
link: '/cli/cmdline/script/tree' | ||
--- | ||
|
||
# Script Run | ||
|
||
**Note:** This is an experimental command that is likely subject to change in the future. | ||
|
||
The `script run LABEL...` command will run a Terramate script over a set of stacks. The `LABEL` (one or more) needs to exactly match the labels defined in the `script` block: | ||
|
||
``` | ||
script "label1" "label2" { | ||
... | ||
} | ||
``` | ||
|
||
The above script could therefore be called with `script run label1 label2`. | ||
|
||
The script will run on all stacks under the current working directory where: | ||
|
||
- the script is available (scripts follow the same inheritance rules as globals) | ||
- any filters match. `script run` currently supports `--changed` and `--tags` filters. | ||
|
||
## Usage | ||
|
||
`terramate experimental script run [options] SCRIPT-LABEL...` | ||
|
||
## Examples | ||
|
||
Run a script called "deploy" on all stacks where it is available: | ||
|
||
```bash | ||
terramate experimental script run deploy | ||
``` | ||
|
||
Run a script called "deploy" on all changed stacks where it is available: | ||
|
||
```bash | ||
terramate experimental script run --changed deploy | ||
``` | ||
|
||
Do a dry run of running the deploy script: | ||
|
||
```bash | ||
terramate experimental script run --dry-run deploy | ||
``` | ||
|
||
Run a script called "deploy" in a specific stack without recursing into subdirectories: | ||
|
||
```bash | ||
terramate -C path/to/stack experimental script run --no-recursive deploy | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: terramate script tree - Command | ||
description: The script tree command shows a tree of all scripts | ||
|
||
prev: | ||
text: 'Script Run' | ||
link: '/cli/cmdline/script/run' | ||
|
||
next: | ||
text: 'Trigger' | ||
link: '/cli/cmdline/trigger' | ||
--- | ||
|
||
# Script Tree | ||
|
||
Shows a tree-view of all scripts relative to the current directory (or a specific directory with the -C flag). The tree expands all sub-directories, and the parent path back to the project root, showing script definitions per directory. | ||
|
||
## Usage | ||
|
||
`terramate experimental script tree` | ||
|
||
## Example | ||
|
||
```bash | ||
$ terramate experimental script tree | ||
/ | ||
│ * deploy: "deploy the infra" | ||
├── dev | ||
│ └── #ec2 | ||
│ ~ deploy | ||
├── prd | ||
│ └── #ec2 | ||
│ ~ deploy | ||
└── stg | ||
└── #ec2 | ||
~ deploy | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.