Skip to content

Commit

Permalink
add more log
Browse files Browse the repository at this point in the history
  • Loading branch information
bootjp committed Mar 4, 2021
1 parent 56c90da commit 66782c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ func IsOverHoursFailedJob(job *gojenkins.Job) (bool, error) {
if err != nil {
logger.Println("got err GetLastBuild")
logger.Println(err)
logger.Println(errors.WithStack(err))

return false, err
}
Expand All @@ -247,6 +248,7 @@ func IsConsecutiveFailJob(job *gojenkins.Job) (bool, error) {

if err != nil {
logger.Println("got err GetAllBuildIds")
logger.Println(err)
logger.Println(errors.WithStack(err))

return false, err
Expand All @@ -255,7 +257,9 @@ func IsConsecutiveFailJob(job *gojenkins.Job) (bool, error) {
lastBuild, err := job.GetLastBuild()
if err != nil {
logger.Println("got err GetLastBuild")
logger.Println(err)
logger.Println(errors.WithStack(err))

return false, err
}

Expand All @@ -268,6 +272,7 @@ func IsConsecutiveFailJob(job *gojenkins.Job) (bool, error) {
build, err := job.GetBuild(buildId.Number)
if err != nil {
logger.Println("got err GetBuild")
logger.Println(err)
logger.Println(errors.WithStack(err))

return false, err
Expand All @@ -276,7 +281,6 @@ func IsConsecutiveFailJob(job *gojenkins.Job) (bool, error) {
switch build.GetResult() {
case JenkinsResultFail:
return true, nil

case JenkinsResultAbort:
continue
case JenkinsResultSuccess:
Expand Down

0 comments on commit 66782c9

Please sign in to comment.