Add configuration source reporting
This commit is contained in:
@@ -365,10 +365,22 @@ func artifactFamilySource(cfg *PipelineConfig, family string) string {
|
||||
return ""
|
||||
}
|
||||
prefix := "scriptorium.artifact_families." + family + "."
|
||||
var fallback string
|
||||
for _, ownership := range cfg.resolution.ownership {
|
||||
if strings.HasPrefix(ownership.path, prefix) && len(ownership.sources) > 0 {
|
||||
return ownership.sources[0]
|
||||
if !strings.HasPrefix(ownership.path, prefix) || len(ownership.sources) == 0 {
|
||||
continue
|
||||
}
|
||||
for _, source := range ownership.sources {
|
||||
if source != pipelineDefaultOwnershipSource {
|
||||
return source
|
||||
}
|
||||
if fallback == "" {
|
||||
fallback = source
|
||||
}
|
||||
}
|
||||
}
|
||||
if fallback != "" {
|
||||
return fallback
|
||||
}
|
||||
return pipelineDefaultOwnershipSource
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user