Skip to content

Commit a836bad

Browse files
Merge pull request #38 from codefresh-io/create-runtime-mutation-without-persisting
create-runtime-mutation-without-persisting
2 parents 61d544b + 09d3e06 commit a836bad

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

pkg/codefresh/argo_runtime.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
type (
1111
IRuntimeAPI interface {
1212
List(ctx context.Context) ([]model.Runtime, error)
13-
Create(ctx context.Context, runtimeName, cluster, runtimeVersion string) (*model.RuntimeCreationResponse, error)
13+
Create(ctx context.Context, runtimeName string) (*model.RuntimeCreationResponse, error)
1414
}
1515

1616
argoRuntime struct {
@@ -75,24 +75,20 @@ func (r *argoRuntime) List(ctx context.Context) ([]model.Runtime, error) {
7575
return runtimes, nil
7676
}
7777

78-
func (r *argoRuntime) Create(ctx context.Context, runtimeName, cluster, runtimeVersion string) (*model.RuntimeCreationResponse, error) {
78+
func (r *argoRuntime) Create(ctx context.Context, runtimeName string) (*model.RuntimeCreationResponse, error) {
7979
jsonData := map[string]interface{}{
8080
"query": `
8181
mutation CreateRuntime(
8282
$name: String!
83-
$cluster: String!
84-
$runtimeVersion: String!
8583
) {
86-
runtime(name: $name, cluster: $cluster, runtimeVersion: $runtimeVersion) {
84+
runtime(name: $name) {
8785
name
8886
newAccessToken
8987
}
9088
}
9189
`,
9290
"variables": map[string]interface{}{
93-
"name": runtimeName,
94-
"cluster": cluster,
95-
"runtimeVersion": runtimeVersion,
91+
"name": runtimeName,
9692
},
9793
}
9894

0 commit comments

Comments
 (0)