Skip to content

Commit

Permalink
fix: [TKC-2310] cloud ui url, org id, env id test workflow vars (#5703)
Browse files Browse the repository at this point in the history
* fix: cloud ui url, org id, env id vars

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: rename var

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: rename var

Signed-off-by: Vladislav Sukhin <[email protected]>

---------

Signed-off-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin authored and rangoo94 committed Aug 14, 2024
1 parent c4edd4e commit 8235113
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/tcl/testworkflow-toolkit/spawn/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ func CreateBaseMachine() expressions.Machine {
"cloud.api.tlsInsecure": strconv.FormatBool(env.Config().Cloud.TlsInsecure),
"cloud.api.skipVerify": strconv.FormatBool(env.Config().Cloud.SkipVerify),
"cloud.api.url": env.Config().Cloud.Url,
"cloud.ui.url": env.Config().Cloud.UiUrl,
"cloud.api.orgId": env.Config().Cloud.OrgId,
"cloud.api.envId": env.Config().Cloud.EnvId,

"dashboard.url": env.Config().System.DashboardUrl,
"api.url": env.Config().System.ApiUrl,
Expand Down
3 changes: 3 additions & 0 deletions cmd/testworkflow-toolkit/env/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ type envObjectStorageConfig struct {
type envCloudConfig struct {
Url string `envconfig:"TK_C_URL"`
ApiKey string `envconfig:"TK_C_KEY"`
UiUrl string `envconfig:"TK_C_UI_URL"`
OrgId string `envconfig:"TK_C_ORG_ID"`
EnvId string `envconfig:"TK_C_ENV_ID"`
SkipVerify bool `envconfig:"TK_C_SKIP_VERIFY" default:"false"`
TlsInsecure bool `envconfig:"TK_C_TLS_INSECURE" default:"false"`
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/testworkflows/testworkflowexecutor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,9 @@ func (e *executor) Execute(ctx context.Context, workflow testworkflowsv1.TestWor
"cloud.api.tlsInsecure": common.GetOr(os.Getenv("TESTKUBE_PRO_TLS_INSECURE"), os.Getenv("TESTKUBE_CLOUD_TLS_INSECURE"), "false"),
"cloud.api.skipVerify": common.GetOr(os.Getenv("TESTKUBE_PRO_SKIP_VERIFY"), os.Getenv("TESTKUBE_CLOUD_SKIP_VERIFY"), "false"),
"cloud.api.url": common.GetOr(os.Getenv("TESTKUBE_PRO_URL"), os.Getenv("TESTKUBE_CLOUD_URL")),
"cloud.ui.url": common.GetOr(os.Getenv("TESTKUBE_PRO_UI_URL"), os.Getenv("TESTKUBE_CLOUD_UI_URL")),
"cloud.api.orgId": common.GetOr(os.Getenv("TESTKUBE_PRO_ORG_ID"), os.Getenv("TESTKUBE_CLOUD_ORG_ID")),
"cloud.api.envId": common.GetOr(os.Getenv("TESTKUBE_PRO_ENV_ID"), os.Getenv("TESTKUBE_CLOUD_ENV_ID")),

"serviceaccount.default": e.serviceAccountNames[namespace],

Expand Down
3 changes: 3 additions & 0 deletions pkg/testworkflows/testworkflowprocessor/stage/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ func (c *container) EnableToolkit(ref string) Container {
"TK_C_KEY": "{{internal.cloud.api.key}}",
"TK_C_TLS_INSECURE": "{{internal.cloud.api.tlsInsecure}}",
"TK_C_SKIP_VERIFY": "{{internal.cloud.api.skipVerify}}",
"TK_C_UI_URL": "{{internal.cloud.ui.url}}",
"TK_C_ORG_ID": "{{internal.cloud.api.orgId}}",
"TK_C_ENV_ID": "{{internal.cloud.api.envId}}",
"TK_OS_ENDPOINT": "{{internal.storage.url}}",
"TK_OS_ACCESSKEY": "{{internal.storage.accessKey}}",
"TK_OS_SECRETKEY": "{{internal.storage.secretKey}}",
Expand Down

0 comments on commit 8235113

Please sign in to comment.