diff --git a/pkg/build/admission/jenkinsbootstrapper/admission.go b/pkg/build/admission/jenkinsbootstrapper/admission.go index 9eb0b17faeba..19cc9c6ff3f8 100644 --- a/pkg/build/admission/jenkinsbootstrapper/admission.go +++ b/pkg/build/admission/jenkinsbootstrapper/admission.go @@ -53,7 +53,7 @@ func NewJenkingsBootstrapper(serviceClient coreclient.ServicesGetter) admission. } func (a *jenkingsBootstrapper) Admit(attributes admission.Attributes) error { - if a.jenkinsConfig.AutoProvisionEnabled == nil || !*a.jenkinsConfig.AutoProvisionEnabled { + if a.jenkinsConfig.AutoProvisionEnabled != nil && !*a.jenkinsConfig.AutoProvisionEnabled { return nil } if len(attributes.GetSubresource()) != 0 { diff --git a/pkg/cmd/server/api/types.go b/pkg/cmd/server/api/types.go index 70c5a9304265..c2f1c6809a01 100644 --- a/pkg/cmd/server/api/types.go +++ b/pkg/cmd/server/api/types.go @@ -331,7 +331,7 @@ type AuditConfig struct { type JenkinsPipelineConfig struct { // AutoProvisionEnabled determines whether a Jenkins server will be spawned from the provided // template when the first build config in the project with type JenkinsPipeline - // is created. When not specified this option defaults to false. + // is created. When not specified this option defaults to true. AutoProvisionEnabled *bool // TemplateNamespace contains the namespace name where the Jenkins template is stored TemplateNamespace string diff --git a/pkg/cmd/server/api/v1/types.go b/pkg/cmd/server/api/v1/types.go index c83ad2839243..abe672d1ba9f 100644 --- a/pkg/cmd/server/api/v1/types.go +++ b/pkg/cmd/server/api/v1/types.go @@ -257,7 +257,7 @@ type AuditConfig struct { type JenkinsPipelineConfig struct { // AutoProvisionEnabled determines whether a Jenkins server will be spawned from the provided // template when the first build config in the project with type JenkinsPipeline - // is created. When not specified this option defaults to false. + // is created. When not specified this option defaults to true. AutoProvisionEnabled *bool `json:"autoProvisionEnabled"` // TemplateNamespace contains the namespace name where the Jenkins template is stored TemplateNamespace string `json:"templateNamespace"`