Before fetching the repository check if the project has container

registry enabled.
closes #14328 #13353

Signed-off-by: Vadim Bauer <vb@container-registry.com>
This commit is contained in:
Vadim Bauer 2021-02-28 19:55:48 +01:00 committed by Ziming
parent b74c4b0cfe
commit e714a8eacc

View File

@ -116,6 +116,11 @@ func (a *adapter) FetchArtifacts(filters []*model.Filter) ([]*model.Resource, er
}
for _, project := range projects {
if !project.RegistryEnabled {
log.Debugf("Skipping project %s: Registry is not enabled", project.Name)
continue
}
repositories, err := a.clientGitlabAPI.getRepositories(project.ID)
if err != nil {
return nil, err