Adopt ConfigKit overlays for pipeline selection
This commit is contained in:
@@ -14,21 +14,21 @@ const (
|
||||
effectivePipelineDigestVersion = "narratio-effective-pipeline-v3\n"
|
||||
)
|
||||
|
||||
// PipelineProfileProvenance identifies the profile selected while resolving a
|
||||
// PipelineOverlayProvenance identifies the overlay selected while resolving a
|
||||
// pipeline. It contains only non-secret selection metadata.
|
||||
type PipelineProfileProvenance struct {
|
||||
type PipelineOverlayProvenance struct {
|
||||
Name string
|
||||
Source string
|
||||
OverlayPath string
|
||||
}
|
||||
|
||||
// SelectedPipelineProfile reports the profile used to resolve cfg, if any.
|
||||
func SelectedPipelineProfile(cfg *PipelineConfig) (*PipelineProfileProvenance, bool) {
|
||||
if cfg == nil || cfg.resolution == nil || cfg.resolution.selectedProfile == nil {
|
||||
// SelectedPipelineOverlay reports the overlay used to resolve cfg, if any.
|
||||
func SelectedPipelineOverlay(cfg *PipelineConfig) (*PipelineOverlayProvenance, bool) {
|
||||
if cfg == nil || cfg.resolution == nil || cfg.resolution.selectedOverlay == nil {
|
||||
return nil, false
|
||||
}
|
||||
selection := cfg.resolution.selectedProfile
|
||||
return &PipelineProfileProvenance{Name: selection.name, Source: selection.source, OverlayPath: selection.overlayPath}, true
|
||||
selection := cfg.resolution.selectedOverlay
|
||||
return &PipelineOverlayProvenance{Name: selection.name, Source: selection.source, OverlayPath: selection.overlayPath}, true
|
||||
}
|
||||
|
||||
// EffectivePipelineDigest reports the deterministic secret-free digest for a
|
||||
|
||||
Reference in New Issue
Block a user