Reconcile reuse and inspection with native extraction
This commit is contained in:
@@ -109,9 +109,9 @@ func (extractStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (re
|
||||
if workspaceRoot == "" {
|
||||
workspaceRoot = env.Config.Pipeline.Workspace.Root
|
||||
}
|
||||
receiptPath, err := absolutePath(artifacts.SessionRunNotariusReceiptPathForCampaign(workspaceRoot, campaign, sessionID, runID))
|
||||
reportPath, err := absolutePath(artifacts.SessionRunNotariusReportPathForCampaign(workspaceRoot, campaign, sessionID, runID))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("extract: resolve receipt path: %w", err)
|
||||
return nil, fmt.Errorf("extract: resolve completion report path: %w", err)
|
||||
}
|
||||
logPath, err := absolutePath(artifacts.SessionRunNotariusLogPathForCampaign(workspaceRoot, campaign, sessionID, runID))
|
||||
if err != nil {
|
||||
@@ -121,7 +121,7 @@ func (extractStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (re
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("extract: resolve output root: %w", err)
|
||||
}
|
||||
directories := []string{filepath.Dir(receiptPath), outputRoot}
|
||||
directories := []string{filepath.Dir(reportPath), outputRoot}
|
||||
for _, directory := range directories {
|
||||
if err := fileops.EnsureWorkspaceDirectory(directory); err != nil {
|
||||
return nil, fmt.Errorf("extract: create directory %q: %w", directory, err)
|
||||
@@ -148,7 +148,7 @@ func (extractStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (re
|
||||
Binary: resolvedBinary, Credentials: notariusConfig.Credentials, ConfigOverlay: notariusConfig.ConfigOverlay,
|
||||
ConfigPath: configPath, PipelineID: notariusConfig.PipelineID,
|
||||
InputPath: inputPath, OutputRoot: outputRoot, WorkingDirectory: workingDirectory,
|
||||
ReceiptPath: receiptPath, LogPath: logPath, Timeout: timeout, Cache: cache,
|
||||
ReportPath: reportPath, LogPath: logPath, Timeout: timeout, Cache: cache,
|
||||
Debug: notariusConfig.Debug, DebugDirectory: debugDirectory, References: referenceBindings,
|
||||
}
|
||||
accepted := false
|
||||
@@ -247,7 +247,7 @@ func (extractStage) Run(ctx context.Context, env *Env, m *manifest.Manifest) (re
|
||||
"reference_count": len(references.Identities), "references": extractReferenceMetadata(references.Identities),
|
||||
"completion": completion,
|
||||
}
|
||||
result = &StageResult{Outputs: outputs, Logs: []string{receiptPath, logPath}, Metadata: metadata}
|
||||
result = &StageResult{Outputs: outputs, Logs: []string{reportPath, logPath}, Metadata: metadata}
|
||||
accepted = true
|
||||
return result, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user