Skip to content

Commit 1dfa132

Browse files
Merge pull request #28 from codefresh-io/CR-5778-2
CR-5778-2
2 parents c2b0721 + 2cfa489 commit 1dfa132

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.30.1
1+
v0.30.2

pkg/codefresh/argo_runtime.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
type (
1212
IArgoRuntimeAPI interface {
1313
List() ([]model.Runtime, error)
14-
Create(runtimeName string) (*model.RuntimeCreationResponse, error)
14+
Create(runtimeName, cluster, runtimeVersion string) (*model.RuntimeCreationResponse, error)
1515
}
1616
argoRuntime struct {
1717
codefresh *codefresh
@@ -35,16 +35,18 @@ func newArgoRuntimeAPI(codefresh *codefresh) IArgoRuntimeAPI {
3535
return &argoRuntime{codefresh: codefresh}
3636
}
3737

38-
func (r *argoRuntime) Create(runtimeName string) (*model.RuntimeCreationResponse, error) {
38+
func (r *argoRuntime) Create(runtimeName, cluster, runtimeVersion string) (*model.RuntimeCreationResponse, error) {
3939
jsonData := map[string]interface{}{
40-
"query": `mutation CreateRuntime($name: String!) {
41-
runtime(name: $name) {
40+
"query": `mutation CreateRuntime($name: String!, $cluster: String!, $runtimeVersion: String!) {
41+
runtime(name: $name, cluster: $cluster, runtimeVersion: $runtimeVersion) {
4242
name
4343
newAccessToken
4444
}
4545
}`,
46-
"variables": map[string]string{
47-
"name": runtimeName,
46+
"variables": map[string]interface{}{
47+
"name": runtimeName,
48+
"cluster": cluster,
49+
"runtimeVersion": runtimeVersion,
4850
},
4951
}
5052

pkg/codefresh/model/models_gen.go

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)