mirror of
https://github.com/goharbor/harbor.git
synced 2024-08-19 02:22:48 +02:00
update
This commit is contained in:
parent
99a492270e
commit
7b39a46c98
|
@ -380,6 +380,7 @@ func assemble(client *registry.Repository, repository string,
|
||||||
if config.WithNotary() {
|
if config.WithNotary() {
|
||||||
signatures, err = getSignatures(repository, username)
|
signatures, err = getSignatures(repository, username)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
signatures = map[string]*notary.Target{}
|
||||||
log.Errorf("failed to get signatures of %s: %v", repository, err)
|
log.Errorf("failed to get signatures of %s: %v", repository, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -397,7 +398,9 @@ func assemble(client *registry.Repository, repository string,
|
||||||
}
|
}
|
||||||
log.Errorf("failed to get v2 manifest of %s:%s: %v", repository, t, err)
|
log.Errorf("failed to get v2 manifest of %s:%s: %v", repository, t, err)
|
||||||
}
|
}
|
||||||
item.tag = *cfg
|
if cfg != nil {
|
||||||
|
item.tag = *cfg
|
||||||
|
}
|
||||||
|
|
||||||
// scan overview
|
// scan overview
|
||||||
if config.WithClair() {
|
if config.WithClair() {
|
||||||
|
@ -796,6 +799,10 @@ func (ra *RepositoryAPI) checkExistence(repository, tag string) (bool, string, e
|
||||||
|
|
||||||
//will return nil when it failed to get data. The parm "tag" is for logging only.
|
//will return nil when it failed to get data. The parm "tag" is for logging only.
|
||||||
func getScanOverview(digest string, tag string) *models.ImgScanOverview {
|
func getScanOverview(digest string, tag string) *models.ImgScanOverview {
|
||||||
|
if len(digest) == 0 {
|
||||||
|
log.Debug("digest is nil")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
data, err := dao.GetImgScanOverview(digest)
|
data, err := dao.GetImgScanOverview(digest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Failed to get scan result for tag:%s, digest: %s, error: %v", tag, digest, err)
|
log.Errorf("Failed to get scan result for tag:%s, digest: %s, error: %v", tag, digest, err)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user