Skip to content

Commit cf752ec

Browse files
Merge pull request #92 from codefresh-io/installation-mutation-separate-args
installation-mutation-separate-args
2 parents 2f2216b + b949f3e commit cf752ec

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.34.7
1+
0.34.8

pkg/codefresh/argo_runtime.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
type (
1111
IRuntimeAPI interface {
12-
Create(ctx context.Context, opts *model.RuntimeInstallationArgs) (*model.RuntimeCreationResponse, error)
12+
Create(ctx context.Context, runtimeName, cluster, runtimeVersion, ingressHost string, componentNames []string) (*model.RuntimeCreationResponse, error)
1313
Get(ctx context.Context, name string) (*model.Runtime, error)
1414
List(ctx context.Context) ([]model.Runtime, error)
1515
Delete(ctx context.Context, runtimeName string) (int, error)
@@ -52,18 +52,24 @@ func newArgoRuntimeAPI(codefresh *codefresh) IRuntimeAPI {
5252
return &argoRuntime{codefresh: codefresh}
5353
}
5454

55-
func (r *argoRuntime) Create(ctx context.Context, opts *model.RuntimeInstallationArgs) (*model.RuntimeCreationResponse, error) {
55+
func (r *argoRuntime) Create(ctx context.Context, runtimeName, cluster, runtimeVersion, ingressHost string, componentNames []string) (*model.RuntimeCreationResponse, error) {
5656
jsonData := map[string]interface{}{
5757
"query": `
58-
mutation CreateRuntime($installationArgs: RuntimeInstallationArgs!) {
59-
runtime(installationArgs: $installationArgs) {
58+
mutation CreateRuntime(
59+
$runtimeName: String!, $cluster: String!, $runtimeVersion: String!, $ingressHost: String, $componentNames: [String]!
60+
) {
61+
runtime(runtimeName: $runtimeName, cluster: $cluster, runtimeVersion: $runtimeVersion, ingressHost: $ingressHost, componentNames: $componentNames) {
6062
name
6163
newAccessToken
6264
}
6365
}
6466
`,
6567
"variables": map[string]interface{}{
66-
"installationArgs": opts,
68+
"runtimeName": runtimeName,
69+
"cluster": cluster,
70+
"runtimeVersion": runtimeVersion,
71+
"ingressHost": ingressHost,
72+
"componentNames": componentNames,
6773
},
6874
}
6975

0 commit comments

Comments
 (0)