DevStream uses YAML files to describe your DevOps toolchain configuration.
Main Config File¶
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
pluginDir: the path/to/your/plugins directory, default:
~/.devstream/plugins, or use
-dflag to specify a directory
state: configuration of DevStream state. For example,
Example Main Config File¶
config.yaml example below:
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.
variables.yaml example below:
Tool file contains a list of tools.
The tool file contains:
- Only one section (at the moment), which is
toolsis 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
namein one config file, and you can also have duplicated
instanceIDin one config file, but the
name + instanceIDcombination 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.
tools.yaml example down below:
tools: - name: repo-scaffolding instanceID: golang-github options: destinationRepo: owner: [[ githubUsername ]] org: "" repo: [[ repoName ]] branch: [[ defaultBranch ]] repoType: github vars: ImageRepo: "[[ dockerhubUsername ]]/[[ repoName ]]" sourceRepo: org: devstream-io repo: dtm-scaffolding-golang repoType: github - name: jira-github-integ instanceID: default dependsOn: [ "repo-scaffolding.golang-github" ] options: owner: [[ githubUsername ]] repo: [[ repoName ]] jiraBaseUrl: https://xxx.atlassian.net jiraUserEmail: email@example.com jiraProjectKey: zzz branch: main
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.
config.yaml as the main config file.
Specifying a Main Config File Explicitly¶
You can override the default value with
No Defaults for varFile and toolFile¶
toolFile, no default values are provided.
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.
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.