Build artifact inventories only for pipeline run reports
Some checks failed
ci/woodpecker/push/verify Pipeline was canceled
Some checks failed
ci/woodpecker/push/verify Pipeline was canceled
This commit is contained in:
@@ -28,7 +28,14 @@ type RunArtifact struct {
|
||||
Evidence string `json:"evidence"`
|
||||
}
|
||||
|
||||
func finalizeInvocation(runtime *invocationRuntime, operationErr error) (*RunSummary, error) {
|
||||
// invocationResult retains terminal evidence without projecting a report-specific
|
||||
// artifact inventory. Preflight needs only whether the lifecycle started.
|
||||
type invocationResult struct {
|
||||
runtime *invocationRuntime
|
||||
evidence *manifest.Manifest
|
||||
}
|
||||
|
||||
func finalizeInvocation(runtime *invocationRuntime, operationErr error) (*invocationResult, error) {
|
||||
evidence := runtime.manifest
|
||||
resultErr := operationErr
|
||||
if operationErr != nil {
|
||||
@@ -42,13 +49,18 @@ func finalizeInvocation(runtime *invocationRuntime, operationErr error) (*RunSum
|
||||
evidence = nil
|
||||
}
|
||||
}
|
||||
return &invocationResult{runtime: runtime, evidence: evidence}, resultErr
|
||||
}
|
||||
|
||||
func (result *invocationResult) runSummary(complete bool) *RunSummary {
|
||||
runtime := result.runtime
|
||||
return &RunSummary{
|
||||
SessionID: runtime.identity.SessionID, RunID: runtime.identity.RunID,
|
||||
ManifestPath: runtime.manifestPath, StageNames: runtime.stageNames,
|
||||
Executed: runtime.executed, Skipped: runtime.skipped,
|
||||
StageResults: runtime.stageResults, AvailableArtifacts: durableRunArtifacts(evidence),
|
||||
Complete: resultErr == nil,
|
||||
}, resultErr
|
||||
StageResults: runtime.stageResults, AvailableArtifacts: durableRunArtifacts(result.evidence),
|
||||
Complete: complete,
|
||||
}
|
||||
}
|
||||
|
||||
func durableRunArtifacts(m *manifest.Manifest) []RunArtifact {
|
||||
|
||||
Reference in New Issue
Block a user