feat(auth): integrate authentication with installation lifecycle
This commit is contained in:
@@ -293,15 +293,18 @@ func authenticationCheck(ctx context.Context, installation config.Installation,
|
||||
}
|
||||
|
||||
func workflowCheck(ctx context.Context, installation config.Installation, runner Runner, secrets []string, add func(string, string, string)) {
|
||||
result, err := runner.Run(ctx, installation.ComposeArgs("exec", "-T", "core", "tht", "doctor", "--json"), nil)
|
||||
result, err := runner.Run(ctx, installation.ComposeArgs(
|
||||
"exec", "-T", "core", "node", "dist/operator-command.js", "workflow-doctor",
|
||||
), nil)
|
||||
if err != nil {
|
||||
add("workflow", StatusFailed, commandDetail("container-local workflow doctor", result, err, secrets))
|
||||
return
|
||||
}
|
||||
var payload struct {
|
||||
OK bool `json:"ok"`
|
||||
Ready bool `json:"ready"`
|
||||
Workspaces int `json:"workspaces"`
|
||||
}
|
||||
if json.Unmarshal([]byte(result.Stdout), &payload) != nil || !payload.OK {
|
||||
if json.Unmarshal([]byte(result.Stdout), &payload) != nil || !payload.Ready || payload.Workspaces < 1 {
|
||||
add("workflow", StatusFailed, "container-local workflow doctor returned an invalid or failing report")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user