Tools

1 Tools

DevStream treats everything as a concept named Tool:

  • Each Tool corresponds to a DevStream plugin, which can either install, configure, or integrate some DevOps tools.
  • Each Tool has its Name, InstanceID, and Options.
  • Each Tool can have its dependencies, specified by the dependsOn keyword.

The dependency dependsOn is an array of strings, each element being a dependency.

Each dependency is named in the format of “TOOL_NAME.INSTANCE_ID”.


2 Configuration

Define your needed tools in DevStream config:

  • tools is a list of tool.
  • Each element in the list defines a DevOps tool (managed by a DevStream plugin), with the following key/values:.
    • name: a string without underscore, corresponds to the name of the plugin.
    • instanceID: unique instance ID of a tool.
    • Multiple tools defined with the same name or instanceID are allowd, but name + instanceID must be unique.
  • Each plugin has an optional setting options, and the options for each plugin is different. See the list of plugins for more details.
  • Each plugin has an optional setting dependsOn which defines the dependencies of this plugin. E.g., if A depends on B and C, then dtm will only execute A after B and C.

An example of tools config:

YAML

  1. tools:
  2. - name: repo-scaffolding
  3. instanceID: golang-github
  4. options:
  5. destinationRepo:
  6. owner: [[ githubUsername ]]
  7. name: [[ repoName ]]
  8. branch: [[ defaultBranch ]]
  9. scmType: github
  10. vars:
  11. ImageRepo: "[[ dockerhubUsername ]]/[[ repoName ]]"
  12. sourceRepo:
  13. org: devstream-io
  14. name: dtm-scaffolding-golang
  15. scmType: github
  16. token: [[ env GITHUB_TOKEN ]]
  17. - name: jira
  18. instanceID: default
  19. dependsOn: [ "repo-scaffolding.golang-github" ]
  20. options:
  21. scm:
  22. owner: [[ githubUsername ]]
  23. name: [[ repoName ]]
  24. scmType: github
  25. branch: main
  26. jira:
  27. baseUrl: https://xxx.atlassian.net
  28. userEmail: foo@bar.com
  29. projectKey: zzz
  30. token: [[ env JIRA_TOKEN ]]

[[ githubUsername ]], [[ repoName ]] (and other variables inside the double brackets) are global variables which are defined in the vars section of the config.