Skip to content

Commit 8668b92

Browse files
Merge pull request #59 from codefresh-io/CR-6312-runtime-install-mutation
CR-6312-runtime-install-mutation
2 parents 724bb01 + 83505a9 commit 8668b92

File tree

3 files changed

+86
-11
lines changed

3 files changed

+86
-11
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.34.3
1+
0.34.4

pkg/codefresh/argo_runtime.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type (
1111
IRuntimeAPI interface {
1212
Get(ctx context.Context, name string) (*model.Runtime, error)
1313
List(ctx context.Context) ([]model.Runtime, error)
14-
Create(ctx context.Context, runtimeName string) (*model.RuntimeCreationResponse, error)
14+
Create(ctx context.Context, runtimeName, cluster, runtimeVersion, ingressHost string, componentNames []string) (*model.RuntimeCreationResponse, error)
1515
Delete(ctx context.Context, runtimeName string) (int, error)
1616
}
1717

@@ -74,6 +74,7 @@ func (r *argoRuntime) Get(ctx context.Context, name string) (*model.Runtime, err
7474
cluster
7575
ingressHost
7676
runtimeVersion
77+
installationStatus
7778
}
7879
}
7980
`,
@@ -120,6 +121,7 @@ func (r *argoRuntime) List(ctx context.Context) ([]model.Runtime, error) {
120121
cluster
121122
ingressHost
122123
runtimeVersion
124+
installationStatus
123125
}
124126
}
125127
}
@@ -144,20 +146,24 @@ func (r *argoRuntime) List(ctx context.Context) ([]model.Runtime, error) {
144146
return runtimes, nil
145147
}
146148

147-
func (r *argoRuntime) Create(ctx context.Context, runtimeName string) (*model.RuntimeCreationResponse, error) {
149+
func (r *argoRuntime) Create(ctx context.Context, runtimeName, cluster, runtimeVersion, ingressHost string, componentNames []string) (*model.RuntimeCreationResponse, error) {
148150
jsonData := map[string]interface{}{
149151
"query": `
150152
mutation CreateRuntime(
151-
$name: String!
153+
$runtimeName: String!, $cluster: String!, $runtimeVersion: String!, $ingressHost: String, $componentNames: [String]!
152154
) {
153-
runtime(name: $name) {
155+
runtime(runtimeName: $runtimeName, cluster: $cluster, runtimeVersion: $runtimeVersion, ingressHost: $ingressHost, componentNames: $componentNames) {
154156
name
155157
newAccessToken
156158
}
157159
}
158160
`,
159161
"variables": map[string]interface{}{
160-
"name": runtimeName,
162+
"runtimeName": runtimeName,
163+
"cluster": cluster,
164+
"runtimeVersion": runtimeVersion,
165+
"ingressHost": ingressHost,
166+
"componentNames": componentNames,
161167
},
162168
}
163169

pkg/codefresh/model/models_gen.go

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

0 commit comments

Comments
 (0)