summaryrefslogtreecommitdiff
path: root/app/models/project_services/gitlab_ci_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project_services/gitlab_ci_service.rb')
-rw-r--r--app/models/project_services/gitlab_ci_service.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/project_services/gitlab_ci_service.rb b/app/models/project_services/gitlab_ci_service.rb
index ecdcd48ae60..acbbc9935b6 100644
--- a/app/models/project_services/gitlab_ci_service.rb
+++ b/app/models/project_services/gitlab_ci_service.rb
@@ -21,7 +21,7 @@
class GitlabCiService < CiService
API_PREFIX = "api/v1"
- prop_accessor :project_url, :token
+ prop_accessor :project_url, :token, :enable_ssl_verification
validates :project_url,
presence: true,
format: { with: /\A#{URI.regexp(%w(http https))}\z/, message: "should be a valid url" }, if: :activated?
@@ -34,6 +34,7 @@ class GitlabCiService < CiService
def compose_service_hook
hook = service_hook || build_service_hook
hook.url = [project_url, "/build", "?token=#{token}"].join("")
+ hook.enable_ssl_verification = enable_ssl_verification
hook.save
end
@@ -136,7 +137,8 @@ class GitlabCiService < CiService
def fields
[
{ type: 'text', name: 'token', placeholder: 'GitLab CI project specific token' },
- { type: 'text', name: 'project_url', placeholder: 'http://ci.gitlabhq.com/projects/3' }
+ { type: 'text', name: 'project_url', placeholder: 'http://ci.gitlabhq.com/projects/3' },
+ { type: 'checkbox', name: 'enable_ssl_verification', title: "Enable SSL verification" }
]
end