Merge pull request #568 from ptdtan/master

resolve the continuous deployment for the same image tag
pull/582/head
Karolis 2021-02-09 08:41:07 +00:00 committed by GitHub
commit 806332237d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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