Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Comply with container image tag for manual release
Browse files Browse the repository at this point in the history
The automated release process complies with container image tag filters
that only release images that match that tag pattern.

This commit extends the manual release to comply with image tag filters
as well.
  • Loading branch information
rndstr committed Aug 3, 2018
1 parent 7baf234 commit 2a1c864
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion update/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,12 @@ func (s ReleaseSpec) calculateImageUpdates(rc ReleaseContext, candidates []*Cont
for _, container := range containers {
currentImageID := container.Image

filteredImages := imageRepos.GetRepoImages(currentImageID.Name).FilterAndSort(policy.PatternAll)
tagPattern := policy.PatternAll
if pattern, ok := u.Resource.Policy().Get(policy.TagPrefix(container.Name)); ok {
tagPattern = policy.NewPattern(pattern)
}

filteredImages := imageRepos.GetRepoImages(currentImageID.Name).FilterAndSort(tagPattern)
latestImage, ok := filteredImages.Latest()
if !ok {
if currentImageID.CanonicalName() != singleRepo {
Expand Down

0 comments on commit 2a1c864

Please sign in to comment.