mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 22:57:38 +01:00
fix[replicatioin] aliyun acr pull with repo filter
Signed-off-by: Ziming Zhang <zziming@vmware.com>
This commit is contained in:
parent
a6c7e15d7e
commit
d16753ae96
@ -256,22 +256,16 @@ func (a *adapter) FetchArtifacts(filters []*model.Filter) (resources []*model.Re
|
|||||||
|
|
||||||
log.Debugf("\nnamespace: %s \t repositories: %#v\n\n", namespace, repos)
|
log.Debugf("\nnamespace: %s \t repositories: %#v\n\n", namespace, repos)
|
||||||
|
|
||||||
if _, ok := util.IsSpecificPathComponent(namespacePattern); ok {
|
for _, repo := range repos {
|
||||||
log.Debugf("specific namespace: %s", repoPattern)
|
var ok bool
|
||||||
repositories = append(repositories, repos...)
|
var repoName = filepath.Join(repo.RepoNamespace, repo.RepoName)
|
||||||
} else {
|
ok, err = util.Match(repoPattern, repoName)
|
||||||
for _, repo := range repos {
|
log.Debugf("\n Repository: %s\t repoPattern: %s\t Match: %v\n", repoName, repoPattern, ok)
|
||||||
|
if err != nil {
|
||||||
var ok bool
|
return
|
||||||
var repoName = filepath.Join(repo.RepoNamespace, repo.RepoName)
|
}
|
||||||
ok, err = util.Match(repoPattern, repoName)
|
if ok {
|
||||||
log.Debugf("\n Repository: %s\t repoPattern: %s\t Match: %v\n", repoName, repoPattern, ok)
|
repositories = append(repositories, repo)
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok {
|
|
||||||
repositories = append(repositories, repo)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user