PR fixes
This commit is contained in:
parent
177c3000b6
commit
bf7b5d51cc
1 changed files with 8 additions and 2 deletions
|
@ -228,16 +228,22 @@ func PostBuild(c *gin.Context) {
|
|||
c.String(500, err.Error())
|
||||
return
|
||||
}
|
||||
if build.Event == model.EventPush ||
|
||||
build.Event == model.EventPull ||
|
||||
build.Event == model.EventTag ||
|
||||
build.Event == model.EventDeploy {
|
||||
build.Event = c.DefaultQuery("event", build.Event)
|
||||
}
|
||||
build.Deploy = c.DefaultQuery("deploy_to", build.Deploy)
|
||||
}
|
||||
|
||||
|
||||
// todo move this to database tier
|
||||
// and wrap inside a transaction
|
||||
build.Status = model.StatusPending
|
||||
build.Started = 0
|
||||
build.Finished = 0
|
||||
build.Enqueued = time.Now().UTC().Unix()
|
||||
build.Event = c.DefaultQuery("event", build.Event)
|
||||
build.Deploy = c.DefaultQuery("deploy_to", build.Deploy)
|
||||
for _, job := range jobs {
|
||||
job.Status = model.StatusPending
|
||||
job.Started = 0
|
||||
|
|
Loading…
Reference in a new issue