Derive artifact catalogs from the selected party without changing configuration
This commit is contained in:
@@ -14,16 +14,13 @@ type artifactDependencyOrigin struct {
|
||||
family string
|
||||
}
|
||||
|
||||
func finalizeArtifactDependencies(cfg *PipelineConfig) {
|
||||
if cfg == nil || cfg.Scriptorium == nil {
|
||||
return
|
||||
}
|
||||
for artifactName, artifact := range cfg.Scriptorium.Artifacts {
|
||||
func resolveArtifactDependencies(artifacts map[string]ScriptoriumArtifactConfig, families ArtifactFamilyCatalog) {
|
||||
for artifactName, artifact := range artifacts {
|
||||
priorOrigins := artifact.dependencyOrigins
|
||||
origins := make(map[string][]artifactDependencyOrigin)
|
||||
dependencies := make(map[string]struct{})
|
||||
family := ""
|
||||
if member, ok := cfg.familyCatalog.Members[artifactName]; ok {
|
||||
if member, ok := families.Members[artifactName]; ok {
|
||||
family = member.Family
|
||||
}
|
||||
|
||||
@@ -65,7 +62,7 @@ func finalizeArtifactDependencies(cfg *PipelineConfig) {
|
||||
|
||||
artifact.DependsOn = sortedDependencyKeys(dependencies)
|
||||
artifact.dependencyOrigins = origins
|
||||
cfg.Scriptorium.Artifacts[artifactName] = artifact
|
||||
artifacts[artifactName] = artifact
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user