Skip to content

Commit 397518d

Browse files
author
Oleg Sucharevich
committed
put variabels as object in run request
1 parent 0599caa commit 397518d

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.7.1
1+
0.7.2

pkg/codefresh/pipeline.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,15 @@ func (p *pipeline) List() ([]*Pipeline, error) {
8686
}
8787

8888
func (p *pipeline) Run(name string, options *RunOptions) (string, error) {
89-
variables := []string{}
9089
if options == nil {
9190
options = &RunOptions{}
9291
}
93-
for k, v := range options.Variables {
94-
variables = append(variables, fmt.Sprintf("%s=%s", k, v))
95-
}
9692
resp, err := p.codefresh.requestAPI(&requestOptions{
9793
path: fmt.Sprintf("/api/pipelines/run/%s", url.PathEscape(name)),
9894
method: "POST",
9995
body: map[string]interface{}{
10096
"branch": options.Branch,
101-
"variables": variables,
97+
"variables": options.Variables,
10298
},
10399
})
104100
if err != nil {

0 commit comments

Comments
 (0)