chore(model): create build, stage, step and logs table

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi.Wu
2022-09-01 11:03:50 +08:00
committed by Jason Song
parent e05f224d19
commit e07d416366
7 changed files with 66 additions and 31 deletions

View File

@@ -118,14 +118,14 @@ func GetBuildJobLogs(ctx *context.Context) {
ctx.Error(http.StatusInternalServerError, err.Error())
return
}
var buildJob *bots_model.BuildJob
var buildJob *bots_model.BuildStage
wf := ctx.Params("workflow")
jobname := ctx.Params("jobname")
LOOP_WORKFLOWS:
for workflow, jobs := range workflows {
if workflow == wf {
for _, job := range jobs {
if jobname == job.Jobname {
if jobname == job.Name {
buildJob = job
break LOOP_WORKFLOWS
}