Skip to content

Commit e66edb3

Browse files
tested with installation status enum
1 parent 0509b4c commit e66edb3

File tree

2 files changed

+62
-6
lines changed

2 files changed

+62
-6
lines changed

pkg/codefresh/argo_runtime.go

Lines changed: 6 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, cluster, runtimeVersion, ingressHost 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

@@ -146,23 +146,24 @@ func (r *argoRuntime) List(ctx context.Context) ([]model.Runtime, error) {
146146
return runtimes, nil
147147
}
148148

149-
func (r *argoRuntime) Create(ctx context.Context, runtimeName, cluster, runtimeVersion, ingressHost string) (*model.RuntimeCreationResponse, error) {
149+
func (r *argoRuntime) Create(ctx context.Context, runtimeName, cluster, runtimeVersion, ingressHost string, componentNames []string) (*model.RuntimeCreationResponse, error) {
150150
jsonData := map[string]interface{}{
151151
"query": `
152152
mutation CreateRuntime(
153-
$name: String!, $cluster: String!, $runtimeVersion: String!, $ingressHost: String
153+
$runtimeName: String!, $cluster: String!, $runtimeVersion: String!, $ingressHost: String, $componentNames: [String]!
154154
) {
155-
runtime(name: $name, cluster: $cluster, runtimeVersion: $runtimeVersion, ingressHost: $ingressHost) {
155+
runtime(runtimeName: $runtimeName, cluster: $cluster, runtimeVersion: $runtimeVersion, ingressHost: $ingressHost, componentNames: $componentNames) {
156156
name
157157
newAccessToken
158158
}
159159
}
160160
`,
161161
"variables": map[string]interface{}{
162-
"name": runtimeName,
162+
"runtimeName": runtimeName,
163163
"cluster": cluster,
164164
"runtimeVersion": runtimeVersion,
165165
"ingressHost": ingressHost,
166+
"componentNames": componentNames,
166167
},
167168
}
168169

pkg/codefresh/model/models_gen.go

Lines changed: 56 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)