Skip to content

Commit

Permalink
update api.build
Browse files Browse the repository at this point in the history
  • Loading branch information
TimHuynh committed Jul 22, 2024
1 parent ef49dc2 commit 3e5de5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/vela-build-summary/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/dustin/go-humanize"
"github.com/go-vela/types/library"
api "github.com/go-vela/server/api/types"
"github.com/gosuri/uitable"
"github.com/sirupsen/logrus"
)
Expand Down Expand Up @@ -44,7 +44,7 @@ func buildRate(duration string, size uint64) int64 {
}

// buildRow is a helper function to produce a build row in the build summary table.
func buildRow(table *uitable.Table, b *library.Build, buildLines *int, buildSize *uint64) {
func buildRow(table *uitable.Table, b *api.Build, buildLines *int, buildSize *uint64) {
logrus.Debug("adding build information to build summary table")

// calculate duration based off the build timestamps
Expand Down
3 changes: 2 additions & 1 deletion cmd/vela-build-summary/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"os"

api "github.com/go-vela/server/api/types"
"github.com/go-vela/types/library"
"github.com/gosuri/uitable"
"github.com/sirupsen/logrus"
Expand All @@ -17,7 +18,7 @@ import (
// build, such as name, number, status and duration of runtime. Also in the
// table are some more fine grained metrics on log size and rate of logs
// produced throughout the lifecycle of each resource.
func table(build *library.Build, logs *[]library.Log, services *[]library.Service, steps *[]library.Step) error {
func table(build *api.Build, logs *[]library.Log, services *[]library.Service, steps *[]library.Step) error {
logrus.Debug("creating table for build summary")

// create a new table
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
github.com/Masterminds/semver/v3 v3.2.1
github.com/dustin/go-humanize v1.0.1
github.com/go-vela/sdk-go v0.24.0
github.com/go-vela/server v0.24.1
github.com/go-vela/types v0.24.0
github.com/gosuri/uitable v0.0.4
github.com/joho/godotenv v1.5.1
Expand All @@ -23,7 +24,6 @@ require (
github.com/drone/envsubst v1.0.3 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-vela/server v0.24.1 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/google/go-querystring v1.1.0 // indirect
Expand Down

0 comments on commit 3e5de5f

Please sign in to comment.