File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ---
2- # core config
3- varFile : " " # If not empty, use the specified external variables config file
4- toolFile : " " # If not empty, use the specified external tools config file
5- state : # state config, backend can be local, s3 or k8s
6- backend : local
7- options :
8- stateFile : devstream.state
1+ config :
2+ state : # state config, backend can be local, s3 or k8s
3+ backend : local
4+ options :
5+ stateFile : devstream.state
96
10- ---
11- # variables config
12- defaultBranch : main
13- githubUsername : daniel-hutao
14- repoName : dtm-test-go
15- jiraID : merico
16- jiraUserEmail : tao.hu@merico.dev
17- jiraProjectKey : DT
18- dockerhubUsername : exploitht
19- argocdNameSpace : argocd
20- argocdDeployTimeout : 10m
7+ vars :
8+ defaultBranch : main
9+ githubUsername : daniel-hutao
10+ repoName : dtm-test-go
11+ jiraID : merico
12+ jiraUserEmail : tao.hu@merico.dev
13+ jiraProjectKey : DT
14+ dockerhubUsername : exploitht
15+ argocdNameSpace : argocd
16+ argocdDeployTimeout : 10m
2117
22- ---
23- # plugins config
2418tools :
2519- name : repo-scaffolding
2620 instanceID : golang-github
Original file line number Diff line number Diff line change 1- ---
2- # core config
3- varFile : " " # If not empty, use the specified external variables config file
4- toolFile : " " # If not empty, use the specified external tools config file
5- state : # state config, backend can be local, s3 or k8s
6- backend : local
7- options :
8- stateFile : devstream.state
1+ config :
2+ state : # state config, backend can be local, s3 or k8s
3+ backend : local
4+ options :
5+ stateFile : devstream.state
96
10- ---
11- # plugins config
127tools :
138- name : repo-scaffolding
149 instanceID : golang-github
Original file line number Diff line number Diff line change 11package configmanager
22
33import (
4- "errors"
5- "io"
64 "os"
75 "regexp"
86
@@ -66,7 +64,7 @@ func (m *Manager) getConfigFromFile() (*Config, error) {
6664 configBytesEscaped := escapeBrackets (configBytes )
6765
6866 var c Config
69- if err = yaml .Unmarshal (configBytesEscaped , & c ); err != nil && ! errors . Is ( err , io . EOF ) {
67+ if err = yaml .Unmarshal (configBytesEscaped , & c ); err != nil {
7068 log .Errorf ("Please verify the format of your config. Error: %s." , err )
7169 return nil , err
7270 }
Original file line number Diff line number Diff line change 1- # defaultconfig.yaml sample:
2- # var file path, you can set it to absolute path or relative path.
3- varFile : variables.yaml # here is a relative path. (defaults is ./variables.yaml)
4- # tool file path, you can set it to absolute path or relative path.
5- toolFile : tools.yaml # here is a relative path.
6- pluginDir : " " # If empty, use the default value: ~/.devstream/plugins, or use -d flag to specify a directory
7- # state config
8- state :
9- backend : local # backend can be local or s3
10- options :
11- stateFile : devstream.state
1+ config :
2+ state :
3+ backend : local # backend can be local or s3
4+ options :
5+ stateFile : devstream.state
6+
7+ vars :
8+ githubUsername : daniel-hutao
9+ repo : go-webapp-demo
1210
13- # tools.yaml sample:
1411tools :
1512- name : repo-scaffolding
1613 instanceID : default
2522 org : devstream-io
2623 repo : dtm-scaffolding-golang
2724 repoType : github
28-
29- # variables.yaml sample:
30- githubUsername : daniel-hutao
31- repo : go-webapp-demo
Original file line number Diff line number Diff line change 1- ---
2- # core config
3- varFile : " " # If not empty, use the specified external variables config file
4- toolFile : " " # If not empty, use the specified external tools config file
5- state : # state config, backend can be local, s3 or k8s
6- backend : local
7- options :
8- stateFile : devstream.state
1+ config :
2+ state : # state config, backend can be local, s3 or k8s
3+ backend : local
4+ options :
5+ stateFile : devstream.state
96
10- ---
11- # variables config
12- defaultBranch : main
13- githubUsername : daniel-hutao
14- repoName : dtm-test-go
15- jiraID : merico
16- jiraUserEmail : tao.hu@merico.dev
17- jiraProjectKey : DT
18- dockerhubUsername : exploitht
19- argocdNameSpace : argocd
20- argocdDeployTimeout : 10m
7+ vars :
8+ defaultBranch : main
9+ githubUsername : daniel-hutao
10+ repoName : dtm-test-go
11+ jiraID : merico
12+ jiraUserEmail : tao.hu@merico.dev
13+ jiraProjectKey : DT
14+ dockerhubUsername : exploitht
15+ argocdNameSpace : argocd
16+ argocdDeployTimeout : 10m
2117
22- ---
23- # plugins config
2418tools :
2519- name : repo-scaffolding
2620 instanceID : golang-github
Original file line number Diff line number Diff line change 1- ---
2- # core config
3- varFile : " " # If not empty, use the specified external variables config file
4- toolFile : " " # If not empty, use the specified external tools config file
5- state : # state config, backend can be local, s3 or k8s
6- backend : local
7- options :
8- stateFile : devstream.state
1+ config :
2+ state : # state config, backend can be local, s3 or k8s
3+ backend : local
4+ options :
5+ stateFile : devstream.state
96
10- ---
11- # plugins config
127tools :
138- name : repo-scaffolding
149 instanceID : golang-github
You can’t perform that action at this time.
0 commit comments