Merge pull request #286 from plumdog/more_version_comparison_logging
More version comparison loggingfeature/policy_from_annotations
commit
4e1b35679a
|
@ -407,9 +407,8 @@ func (j *WatchRepositoryTagsJob) Run() {
|
|||
return
|
||||
}
|
||||
|
||||
log.Debugf("new tag '%s' available", latestVersion)
|
||||
|
||||
if newAvailable {
|
||||
log.Debugf("new tag '%s' available", latestVersion)
|
||||
// updating current latest
|
||||
j.details.latest = latestVersion
|
||||
event := types.Event{
|
||||
|
@ -424,5 +423,7 @@ func (j *WatchRepositoryTagsJob) Run() {
|
|||
"new_tag": latestVersion,
|
||||
}).Info("trigger.poll.WatchRepositoryTagsJob: submiting event to providers")
|
||||
j.providers.Submit(event)
|
||||
} else {
|
||||
log.Debugf("no new tag available")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,9 @@ func NewAvailable(current string, tags []string) (newVersion string, newAvailabl
|
|||
sort.Sort(sort.Reverse(semver.Collection(vs)))
|
||||
|
||||
if currentVersion.LessThan(vs[0]) {
|
||||
log.WithFields(log.Fields{"currentVersion": currentVersion, "latestAvailable": vs[0]}).Debug("latest available is newer than current")
|
||||
return vs[0].Original(), true, nil
|
||||
}
|
||||
log.WithFields(log.Fields{"currentVersion": currentVersion, "latestAvailable": vs[0]}).Debug("latest available is not newer than current")
|
||||
return "", false, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue