mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-16 23:35:20 +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)
|
||||
|
||||
if _, ok := util.IsSpecificPathComponent(namespacePattern); ok {
|
||||
log.Debugf("specific namespace: %s", repoPattern)
|
||||
repositories = append(repositories, repos...)
|
||||
} else {
|
||||
for _, repo := range repos {
|
||||
|
||||
var ok bool
|
||||
var repoName = filepath.Join(repo.RepoNamespace, repo.RepoName)
|
||||
ok, err = util.Match(repoPattern, repoName)
|
||||
log.Debugf("\n Repository: %s\t repoPattern: %s\t Match: %v\n", repoName, repoPattern, ok)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if ok {
|
||||
repositories = append(repositories, repo)
|
||||
}
|
||||
for _, repo := range repos {
|
||||
var ok bool
|
||||
var repoName = filepath.Join(repo.RepoNamespace, repo.RepoName)
|
||||
ok, err = util.Match(repoPattern, repoName)
|
||||
log.Debugf("\n Repository: %s\t repoPattern: %s\t Match: %v\n", repoName, repoPattern, ok)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if ok {
|
||||
repositories = append(repositories, repo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user