You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core-concepts/config.md
+104-9Lines changed: 104 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,19 @@
2
2
3
3
DevStream uses YAML files to define your DevOps platform.
4
4
5
-
## Sections
5
+
## 1 Sections Overview
6
6
7
7
As aforementioned in the overview, there are several sections in the config:
8
8
9
9
-`config`
10
-
-`vars`
11
10
-`tools`
12
11
-`apps`
13
12
-`pipelineTemplates`
13
+
-`vars`
14
14
15
15
Among which, `config` is mandatory, and you should have at least either `tools` or `apps`. Others are optional.
16
16
17
-
## Config File V.S. Config Folder
17
+
## 2 Config File V.S. Config Folder
18
18
19
19
DevStream supports both:
20
20
@@ -28,11 +28,22 @@ Examples:
28
28
- single file: `dtm init -f config.yaml`
29
29
- directory: `dtm init -f dirname`
30
30
31
-
## The Main Config
31
+
## 3 Sections Detail
32
+
33
+
### 3.1 The Main Config
32
34
33
35
DevStream's own config, the `config` section, contains where to store the state. See [here](./state.md) for more details.
34
36
35
-
## Variables
37
+
38
+
### 3.2 Tools Config
39
+
40
+
The `tools` section defines DevOps tools. Read [this](./tools.md) for all the detail.
41
+
42
+
### 3.3 Apps/pipelineTemplates Config
43
+
44
+
The `apps` section defines Apps and the `pipelineTemplates` defines templates for pipelines. See [here](./apps.md) for more detail.
45
+
46
+
### 3.4 Variables
36
47
37
48
DevStream supports variables. Define key/values in the `vars` section and refer to it in the `tools`, `apps` and `pipelineTemplates` sections.
38
49
@@ -58,10 +69,94 @@ tools:
58
69
# ...
59
70
```
60
71
61
-
## Tools Config
72
+
## 4 Expanded Features
62
73
63
-
The `tools` section defines DevOps tools. Read [this](./tools.md) for all the detail.
74
+
### 4.1 Environment Variables
64
75
65
-
## Apps/pipelineTemplates Config
76
+
Similar to "variables", you can use `[[env "env_key"]]` to refer to environment variables.
77
+
78
+
### 4.2 Output
79
+
80
+
#### Introduction
81
+
82
+
In DevStream's configuration file, we can use Output from one Tool as the options values for another Tool.
83
+
84
+
For example, if Tool A has an output, we can use its value as Tool B's options.
85
+
86
+
Notes:
87
+
88
+
- At the moment, B using A's output doesn't mean B "depends on" A.
89
+
- If B needs to "depend on" A, i.e., we want to make sure A runs first before B runs, we still need to use the `dependsOn` keyword (see the previous section "[Core Concepts](overview.md)" for more details.)
repoURL: ${{ repo-scaffolding.golang-github.outputs.repoURL }} # pay attention here
156
+
```
157
+
158
+
In this example:
159
+
160
+
- The "default" instance of tool `argocdapp` depends on the "golang-github" instance of tool `repo-scaffolding`
161
+
- The "default" instance of tool `argocdapp` has a user option "options.source.repoURL", which uses the "golang-github" instance of tool `repo-scaffolding`'s output "repoURL" (`${{ repo-scaffolding.golang-github.outputs.repoURL }}`)
66
162
67
-
The `apps` section defines Apps and the `pipelineTemplates` defines templates for pipelines. See [here](./apps.md) for more detail.
0 commit comments