feat: Add stage to build logs (#577)

* feat: Add stage to build logs

This adds a stage property to logs, and refactors the job logs
cliui.

It also adds tests to the cliui for build logs!

* Fix comments
This commit is contained in:
Kyle Carberry
2022-03-28 12:43:22 -06:00
committed by GitHub
parent eb18925f11
commit b33dec9d38
29 changed files with 604 additions and 262 deletions

View File

@ -146,8 +146,7 @@ func workspaceCreate() *cobra.Command {
if err != nil {
return err
}
_, err = cliui.Job(cmd, cliui.JobOptions{
Title: "Building workspace...",
err = cliui.ProvisionerJob(cmd, cliui.ProvisionerJobOptions{
Fetch: func() (codersdk.ProvisionerJob, error) {
build, err := client.WorkspaceBuild(cmd.Context(), workspace.LatestBuild.ID)
return build.Job, err