@@ -10,7 +10,7 @@ import (
1010type (
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,31 +75,27 @@ 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
9995 res := & graphQlRuntimeCreationResponse {}
10096 err := r .codefresh .graphqlAPI (ctx , jsonData , res )
10197 if err != nil {
102- return nil , fmt .Errorf ("failed getting runtime list : %w" , err )
98+ return nil , fmt .Errorf ("failed making a graphql API call while creating runtime : %w" , err )
10399 }
104100
105101 if len (res .Errors ) > 0 {
0 commit comments