Configure flat outputs and native Notarius controls

This commit is contained in:
2026-11-30 00:45:13 +00:00
parent f05e711328
commit 4e3ac343b4
10 changed files with 252 additions and 40 deletions

View File

@@ -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)