Mark container ignored on release if repos don't match
@@ -184,6 +184,7 @@ specs:
func calculateImageUpdates(rc *ReleaseContext, candidates []*ServiceUpdate, spec *update.ReleaseSpec, results update.Result) ([]*ServiceUpdate, error) {
// Compile an `ImageMap` of all relevant images
var images ImageMap
+ var repo string
var err error
switch spec.ImageSpec {
@@ -193,6 +194,7 @@ func calculateImageUpdates(rc *ReleaseContext, candidates []*ServiceUpdate, spec
var image flux.ImageID
image, err = spec.ImageSpec.AsID()
if err == nil {
+ repo = image.Repository()
images, err = ExactImages(rc.Registry, []flux.ImageID{image})
}
}
@@ -230,7 +232,11 @@ func calculateImageUpdates(rc *ReleaseContext, candidates []*ServiceUpdate, spec
latestImage := images.LatestImage(currentImageID.Repository())
if latestImage == nil {
+ if currentImageID.Repository() != repo {
+ ignoredOrSkipped = update.ReleaseStatusIgnored
+ } else {
ignoredOrSkipped = update.ReleaseStatusUnknown
+ }
continue
}
