Unify analysis product path identity

This commit is contained in:
2026-11-30 04:02:53 +00:00
parent dbfcfa3f75
commit 3795d86587
11 changed files with 135 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ package artifactpolicy
import (
"errors"
"fmt"
"path/filepath"
"regexp"
"strings"
@@ -340,6 +341,9 @@ func DeriveDefaultPublishedDestination(source Source, configured map[string]stri
if strings.TrimSpace(outputPath) == "" {
return "", fmt.Errorf("pipeline.scriptorium.artifacts.%s.output_path is empty", source.ConfiguredKey)
}
if filepath.IsAbs(outputPath) {
outputPath = filepath.Join("artifacts", filepath.Base(outputPath))
}
return pathsafe.NormalizeRelativeDestination(outputPath)
default:
return "", fmt.Errorf("publish destination cannot be derived from source %q", source.ID)