Can show repository logs in admin interface
Some checks are pending
continuous-integration/drone/push Build is running
Some checks are pending
continuous-integration/drone/push Build is running
This commit is contained in:
parent
5940f14474
commit
5b3bdb0429
3 changed files with 44 additions and 6 deletions
|
|
@ -222,6 +222,7 @@ func declareAPIAuthRepositoriesRoutes(router *gin.RouterGroup) {
|
|||
client := drone.NewClient(droneEndpoint, droneConfig)
|
||||
result, err := client.Logs(tmp[0], tmp[1], nbuild, 1, 3)
|
||||
if err != nil {
|
||||
log.Printf("An error occurs when retrieving logs from Drone (%s/%s/%d/1/3): %s", tmp[0], tmp[1], nbuild, err.Error())
|
||||
c.AbortWithStatusJSON(http.StatusNotFound, gin.H{"errmsg": "Unable to retrieve logs."})
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue