Skip to content

Commit f7d7cf0

Browse files
committed
fix: jenkins add options for config
Signed-off-by: Meng JiaFeng <[email protected]>
1 parent c4a8d2a commit f7d7cf0

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

internal/pkg/configmanager/pipelineDefault.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,24 @@ var (
3333
}
3434
jenkinsGeneral = pipelineOption{
3535
defaultConfigLocation: "https://raw.githubusercontent.com/devstream-io/ci-template/main/jenkins-pipeline/general/Jenkinsfile",
36-
optionGeneratorFunc: pipelineGeneralGenerator,
36+
optionGeneratorFunc: jenkinsGenerator,
3737
}
3838
argocdApp = pipelineOption{
3939
optionGeneratorFunc: pipelineArgocdAppGenerator,
4040
}
4141
)
4242

43+
// jenkinsGenerator generate jenkins pipeline config
44+
func jenkinsGenerator(options RawOptions, app *app) RawOptions {
45+
newOptions := pipelineGeneralGenerator(options, app)
46+
// extract jenkins config from options
47+
jenkinsOptions, exist := options["jenkins"]
48+
if exist {
49+
newOptions["jenkins"] = jenkinsOptions
50+
}
51+
return newOptions
52+
}
53+
4354
// pipelineGeneralGenerator generate pipeline general options from RawOptions
4455
func pipelineGeneralGenerator(options RawOptions, app *app) RawOptions {
4556
if app.Spec != nil {

0 commit comments

Comments
 (0)