Use native pipeline discovery and independent secrets bootstrap
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user