Merge branch 'fix_jenkins_service_params' into 'master'

Fix Jenkins CI parameters

Fixes #45

### Expected behavior

Multi-project and unstable Jenkins CI parameters should be successfully enabled and persisted if the boxes are checked.

### Observed behavior

If either of these checkboxes were selected and saved they were not persisted to the database. This is because the parameters were not in the list of allowed parameters in the controller.

See merge request !30
This commit is contained in:
Robert Speicher
2015-10-11 23:27:09 +00:00
2 changed files with 3 additions and 2 deletions
@@ -9,7 +9,8 @@ class Projects::ServicesController < Projects::ApplicationController
:note_events, :send_from_committer_email, :disable_diffs, :external_wiki_url,
:jira_issue_transition_id,
:notify, :color,
:server_host, :server_port, :default_irc_uri, :enable_ssl_verification]
:server_host, :server_port, :default_irc_uri, :enable_ssl_verification,
:multiproject_enabled, :pass_unstable]
# Authorize
before_action :authorize_admin_project!
before_action :service, only: [:edit, :update, :test]
@@ -52,7 +52,7 @@ class JenkinsService < CiService
{ type: 'checkbox', name: 'multiproject_enabled', title: "Multi-project setup enabled?",
help: "Multi-project mode is configured in Jenkins Gitlab Hook plugin." },
{ type: 'checkbox', name: 'pass_unstable', title: 'Should unstable builds be treated as passing?',
help: 'Unstable builds will be treated as passing.'}
help: 'Unstable builds will be treated as passing.' }
]
end