Config

DevStream uses YAML files to describe your DevOps toolchain configuration.

Main Config File

By default, dtm tries to use ./config.yaml (under your current directory) as the main config.

The main config contains three sections:

  • varFile: the path/to/your/variables file
  • toolFile: the path/to/your/tools configuration file
  • state: configuration of DevStream state. For example,

Example Main Config File

See the config.yaml example below:

  1. varFile: variables.yaml
  2. toolFile: tools.yaml
  3. state:
  4. backend: local
  5. options:
  6. stateFile: devstream.state

Variables File

The var file is a YAML file containing key-value pairs.

At the moment, nested/composite values (for example, the value is a list/dictionary) are not supported yet.

See the variables.yaml example below:

  1. githubUsername: daniel-hutao
  2. repoName: dtm-test-go
  3. defaultBranch: main
  4. dockerhubUsername: exploitht

Tool File

Tool file contains a list of tools.

The tool file contains:

  • Only one section (at the moment), which is tools.
  • tools is a list of dictionaries.
  • Each dictionary defines a DevOps “tool” which is managed by a DevStream plugin
  • Each dictionary (tool) has the following mandatory fields:
    • name: the name of the tool/plugin, string, without underscore
    • instanceID: the id of this tool instance
    • you can have duplicated name in one config file, and you can also have duplicated instanceID in one config file, but the name + instanceID combination must be unique in one config file
  • Each dictionary (tool) has an optional field which is options, which in turn is a dictionary containing parameters for that specific plugin. For plugins’ parameters, see the “plugins” section of this document.
  • Each directory (tool) has an optional field which is dependsOn. Continue reading for detail about dependencies.

See the tools.yaml example down below:

  1. tools:
  2. - name: github-repo-scaffolding-golang
  3. instanceID: default
  4. options:
  5. owner: [[ githubUsername ]]
  6. org: ""
  7. repo: [[ repoName ]]
  8. branch: [[ defaultBranch ]]
  9. image_repo: [[ dockerhubUsername ]]/[[ repoName ]]
  10. - name: jira-github-integ
  11. instanceID: default
  12. dependsOn: [ "github-repo-scaffolding-golang.default" ]
  13. options:
  14. owner: [[ githubUsername ]]
  15. repo: [[ repoName ]]
  16. jiraBaseUrl: https://xxx.atlassian.net
  17. jiraUserEmail: foo@bar.com
  18. jiraProjectKey: zzz
  19. branch: main

State

The state section specifies where to store DevStream state. As of now (v0.5.0), we only support local backend.

From v0.6.0 on, we will support both “local” and “s3” backend store the DevStream state.

Read the section The State Section in the Main Config for more details.

Default Values

By default, dtm uses config.yaml as the main config file.

Specifying a Main Config File Explicitly

You can override the default value with -f or --config-file. Examples:

  1. dtm apply -f path/to/your/config.yaml
  2. dtm apply --config-file path/to/your/config.yaml

No Defaults for varFile and toolFile

For varFile and toolFile, no default values are provided.

If varFile isn’t specified in the main config, dtm will not use any var files, even if there is already a file named variables.yaml under the current directory.

Similarly, if toolFile isn’t specified in the main config, dtm will throw an error, even if there is a tools.yaml file under the current directory.