Skip to content

Commit

Permalink
Fix SE edition mirroring
Browse files Browse the repository at this point in the history
Signed-off-by: Maxim Vasilenko <[email protected]>
  • Loading branch information
Maxim Vasilenko authored and mvasl committed Aug 15, 2024
1 parent 46a4dc2 commit dd95a78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/mirror/cmd/push/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ func PushDeckhouseToRegistry(mirrorCtx *contexts.PushContext) error {
return fmt.Errorf("read index manifest: %w", err)
}

if len(indexManifest.Manifests) == 0 {
log.InfoLn("Skipped repo", originalRepo, "as it contains no images")
continue
}

repo := strings.Replace(originalRepo, mirrorCtx.DeckhouseRegistryRepo, mirrorCtx.RegistryHost+mirrorCtx.RegistryPath, 1)
pushCount := 1
for _, manifest := range indexManifest.Manifests {
Expand Down
1 change: 1 addition & 0 deletions internal/mirror/layouts/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func PullTrivyVulnerabilityDatabasesImages(
dbImageLayout,
map[string]struct{}{ref.String(): {}},
WithTagToDigestMapper(NopTagToDigestMappingFunc),
WithAllowMissingTags(true), // SE edition does not contain images for trivy
); err != nil {
return fmt.Errorf("pull vulnerability database: %w", err)
}
Expand Down

0 comments on commit dd95a78

Please sign in to comment.