Use native pipeline discovery and independent secrets bootstrap

This commit is contained in:
2026-11-17 22:06:29 +00:00
parent 341fe93e3b
commit 6593ccbeaf
21 changed files with 208 additions and 270 deletions

View File

@@ -163,21 +163,22 @@ func loadPipelineCampaignConfigWithDependencies(pipelineFlag, campaignFlag, camp
func loadPipelineConfigWithDependencies(pipelineFlag string, opts config.PipelineLoadOptions, secretsDir *string, deps commandDependencies) (string, *config.PipelineConfig, error) {
deps = normalizeCommandDependencies(deps)
resolvedPipelinePath, err := deps.resolvePipelineConfigPath(pipelineFlag)
if err != nil {
return "", nil, err
}
if !deps.secretsBootstrap.selectionSet {
deps.secretsBootstrap.selection = secretsDir
deps.secretsBootstrap.selectionSet = true
}
if err := deps.secretsBootstrap.load(resolvedPipelinePath, deps.loadSecretsDir, deps.diagnostics); err != nil {
if err := deps.secretsBootstrap.load(deps.loadSecretsDir, deps.diagnostics); err != nil {
return "", nil, err
}
pipelineCfg, err := deps.loadPipelineConfig(resolvedPipelinePath, opts)
opts.Search = deps.pipelineSearch
pipelineCfg, err := deps.loadPipelineConfig(strings.TrimSpace(pipelineFlag), opts)
if err != nil {
return "", nil, err
}
resolvedPipelinePath := config.EffectivePipelineRootPath(pipelineCfg)
if resolvedPipelinePath == "" {
resolvedPipelinePath = strings.TrimSpace(pipelineFlag)
}
return resolvedPipelinePath, pipelineCfg, nil
}