resolve the continuos deployment for the same image tag

pull/568/head
Duy Tan 2020-12-25 20:57:11 +07:00
parent aa4a9f7fd7
commit ffebe63769
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ func (j *WatchRepositoryTagsJob) computeEvents(tags []string) ([]types.Event, er
currentVersion, invalidCurrentVersion := semver.NewVersion(trackedImage.Image.Tag())
// matches, going through tags
for _, version := range versions {
if invalidCurrentVersion == nil && currentVersion.GreaterThan(version) {
if invalidCurrentVersion == nil && (currentVersion.GreaterThan(version) || currentVersion.Equal(version)) {
// Current tag is a valid semver, and is bigger than currently tested one
// -> we can stop now, nothing will be worth upgrading in the rest of the sorted list
break