Skip to content

Conversation

IronCore864
Copy link
Member

@IronCore864 IronCore864 commented Apr 14, 2022

Summary

Key Points

  • This is a breaking change.
  • Documentation (new or existing) is updated.

Description

Config file now supports the use of variables.

  • Use dtm --var-file to specify the location of the var file. Defaults to variables.yaml.
  • If no --var-file is specified, and variables.yaml doesn't exist, continue without an error.

Related Issues

Related to #393 but not totally finished yet. Another PR of documentation with e2e test comes soon.

Screenshots

tiexin@mbp ~/work/stream $ ./dtm --debug apply -f config-variables.yaml
2022-04-14 15:40:43 ℹ [INFO]  Log level is: debug.
2022-04-14 15:40:43 ℹ [INFO]  Apply started.
2022-04-14 15:40:43 ℹ [DEBUG]  Original config:
tools:
- name: myapp
  plugin: gitlabci-generic
  options:
    pathWithNamespace: [[ gitlabUser ]]/go-hello-world
    branch: [[ defaultBranch ]]
    templateURL: [[ gitlabCIGolangTemplate ]]
    templateVariables:
      App: hello


2022-04-14 15:40:43 ℹ [DEBUG]  Variables file:
gitlabUser: ironcore864
defaultBranch: main
gitlabCIGolangTemplate: https://gitlab.com/ironcore864/go-hello-world/-/raw/main/go.tpl


2022-04-14 15:40:43 ℹ [DEBUG]  Config file after rendering with variables:
tools:
- name: myapp
  plugin: gitlabci-generic
  options:
    pathWithNamespace: ironcore864/go-hello-world
    branch: main
    templateURL: https://gitlab.com/ironcore864/go-hello-world/-/raw/main/go.tpl
    templateVariables:
      App: hello

@IronCore864 IronCore864 marked this pull request as ready for review April 14, 2022 10:28
@daniel-hutao daniel-hutao merged commit dd12e25 into devstream-io:main Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants