From f21c7b7c8c88ff9f364ed6a5f4f22707f4e13a7c Mon Sep 17 00:00:00 2001 From: Ben Parees Date: Wed, 21 Sep 2016 10:09:04 +0200 Subject: [PATCH] re-enable jenkins autoprovisioning --- pkg/build/admission/jenkinsbootstrapper/admission.go | 2 +- pkg/cmd/server/api/types.go | 2 +- pkg/cmd/server/api/v1/swagger_doc.go | 2 +- pkg/cmd/server/api/v1/types.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/build/admission/jenkinsbootstrapper/admission.go b/pkg/build/admission/jenkinsbootstrapper/admission.go index 26f1502a3661..9872e98751d7 100644 --- a/pkg/build/admission/jenkinsbootstrapper/admission.go +++ b/pkg/build/admission/jenkinsbootstrapper/admission.go @@ -53,7 +53,7 @@ func NewJenkinsBootstrapper(serviceClient coreclient.ServicesGetter) admission.I } func (a *jenkinsBootstrapper) 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 34336d90de0d..466c14adc874 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/swagger_doc.go b/pkg/cmd/server/api/v1/swagger_doc.go index 7df7fcf49b72..72271ffc0de4 100644 --- a/pkg/cmd/server/api/v1/swagger_doc.go +++ b/pkg/cmd/server/api/v1/swagger_doc.go @@ -308,7 +308,7 @@ func (ImagePolicyConfig) SwaggerDoc() map[string]string { var map_JenkinsPipelineConfig = map[string]string{ "": "JenkinsPipelineConfig holds configuration for the Jenkins pipeline strategy", - "autoProvisionEnabled": "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.", + "autoProvisionEnabled": "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 true.", "templateNamespace": "TemplateNamespace contains the namespace name where the Jenkins template is stored", "templateName": "TemplateName is the name of the default Jenkins template", "serviceName": "ServiceName is the name of the Jenkins service OpenShift uses to detect whether a Jenkins pipeline handler has already been installed in a project. This value *must* match a service name in the provided template.", 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"`