Skip to content

Commit

Permalink
re-enable jenkins autoprovisioning
Browse files Browse the repository at this point in the history
  • Loading branch information
bparees committed Oct 23, 2016
1 parent b3871bb commit f21c7b7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/build/admission/jenkinsbootstrapper/admission.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/server/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/server/api/v1/swagger_doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/server/api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit f21c7b7

Please sign in to comment.