From 825dc630b94d864cb05df821c977a0fcde02de7b Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Wed, 26 Jul 2017 17:58:44 -0400 Subject: [PATCH] return files/artifacts with build --- model/build.go | 1 + server/build.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/model/build.go b/model/build.go index eb29aef7a..e55d92637 100644 --- a/model/build.go +++ b/model/build.go @@ -33,6 +33,7 @@ type Build struct { Reviewer string `json:"reviewed_by" meddler:"build_reviewer"` Reviewed int64 `json:"reviewed_at" meddler:"build_reviewed"` Procs []*Proc `json:"procs,omitempty" meddler:"-"` + Files []*File `json:"files,omitempty" meddler:"-"` } // Trim trims string values that would otherwise exceed diff --git a/server/build.go b/server/build.go index f709245a2..45470e9d0 100644 --- a/server/build.go +++ b/server/build.go @@ -50,8 +50,10 @@ func GetBuild(c *gin.Context) { c.AbortWithError(http.StatusInternalServerError, err) return } + files, _ := store.FromContext(c).FileList(build) procs, _ := store.FromContext(c).ProcList(build) build.Procs = model.Tree(procs) + build.Files = files c.JSON(http.StatusOK, build) }