Skip to content

Commit

Permalink
ignore no build jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
bootjp committed Mar 31, 2021
1 parent c8acdaa commit ee187d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ func DetectFailJobs(jobs []*gojenkins.Job) []*FailJob {
lastBuild, err := job.GetLastBuild()
if err != nil {
ids, _ := job.GetAllBuildIds()
fmt.Println(ids)
if len(ids) == 0 {
continue
}

logger.Println("got err GetLastBuild by " + job.GetName() + " call by DetectFailJobs")
fmt.Printf("%v", lastBuild)
Expand Down

0 comments on commit ee187d2

Please sign in to comment.