Configure flat outputs and native Notarius controls
This commit is contained in:
@@ -3,6 +3,7 @@ package config
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
@@ -91,11 +92,10 @@ func validateScriptoriumDeclarations(artifacts map[string]ScriptoriumArtifactCon
|
||||
}
|
||||
if strings.TrimSpace(artifactCfg.OutputPath) != "" {
|
||||
pathField := "pipeline.scriptorium.artifacts." + artifactName + ".output_path"
|
||||
if err := validateRelativeSafePath(pathField, artifactCfg.OutputPath); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := validatePathWithinRoot(pathField, artifactCfg.OutputPath, DefaultScriptoriumArtifactOutputRoot); err != nil {
|
||||
return err
|
||||
if !filepath.IsAbs(artifactCfg.OutputPath) {
|
||||
if err := validateRelativeSafePath(pathField, artifactCfg.OutputPath); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if previous, exists := outputOwners[artifactCfg.OutputPath]; exists {
|
||||
return fmt.Errorf("%s %q duplicates artifact %q", pathField, artifactCfg.OutputPath, previous)
|
||||
|
||||
Reference in New Issue
Block a user