mirror of
https://github.com/harness/drone.git
synced 2025-05-12 23:20:10 +08:00
return files/artifacts with build
This commit is contained in:
parent
99b10537ba
commit
825dc630b9
@ -33,6 +33,7 @@ type Build struct {
|
|||||||
Reviewer string `json:"reviewed_by" meddler:"build_reviewer"`
|
Reviewer string `json:"reviewed_by" meddler:"build_reviewer"`
|
||||||
Reviewed int64 `json:"reviewed_at" meddler:"build_reviewed"`
|
Reviewed int64 `json:"reviewed_at" meddler:"build_reviewed"`
|
||||||
Procs []*Proc `json:"procs,omitempty" meddler:"-"`
|
Procs []*Proc `json:"procs,omitempty" meddler:"-"`
|
||||||
|
Files []*File `json:"files,omitempty" meddler:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trim trims string values that would otherwise exceed
|
// Trim trims string values that would otherwise exceed
|
||||||
|
@ -50,8 +50,10 @@ func GetBuild(c *gin.Context) {
|
|||||||
c.AbortWithError(http.StatusInternalServerError, err)
|
c.AbortWithError(http.StatusInternalServerError, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
files, _ := store.FromContext(c).FileList(build)
|
||||||
procs, _ := store.FromContext(c).ProcList(build)
|
procs, _ := store.FromContext(c).ProcList(build)
|
||||||
build.Procs = model.Tree(procs)
|
build.Procs = model.Tree(procs)
|
||||||
|
build.Files = files
|
||||||
|
|
||||||
c.JSON(http.StatusOK, build)
|
c.JSON(http.StatusOK, build)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user