-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathgitlab.yml.erb
385 lines (336 loc) · 13.8 KB
/
gitlab.yml.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
# Managed by Puppet
# Module gitlab
#
# # # # # # # # # # # # # # # # # #
# GitLab application config file #
# # # # # # # # # # # # # # # # # #
#
# How to use:
# 1. copy file as gitlab.yml
# 2. Replace gitlab -> host with your domain
# 3. Replace gitlab -> email_from
production: &base
#
# 1. GitLab app settings
# ==========================
## GitLab settings
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
host: <%= @gitlab_domain %>
port: <%= @gitlab_ssl ? @gitlab_ssl_port : @gitlab_http_port %>
https: <%= @gitlab_ssl %>
# Uncommment this line below if your ssh host is different from HTTP/HTTPS one
# (you'd obviously need to replace ssh.host_example.com with your own host).
# Otherwise, ssh host will be set to the `host:` value above
# ssh_host: ssh.host_example.com
# WARNING: See config/application.rb under "Relative url support" for the list of
# other files that need to be changed for relative url support
# relative_url_root: /gitlab
<%- if @gitlab_relative_url_root %>
relative_url_root: <%= @gitlab_relative_url_root %>
<%- end %>
# Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
# user: git
# Uncomment and customize if you want to change the default time zone of GitLab application.
# To see all available zones, run `bundle exec rake time:zones:all RAILS_ENV=production`
<%- if @gitlab_time_zone %>
time_zone: <%= @gitlab_time_zone %>
<%- end %>
## Email settings
# Uncomment and set to false if you need to disable email sending from GitLab (default: true)
email_enabled: <%= @gitlab_email_enabled %>
# Email address used in the "From" field in mails sent by GitLab
email_from: <%= @git_email %>
email_display_name: <%= @gitlab_email_display_name %>
email_reply_to: <%= @gitlab_email_reply_to %>
# Email server smtp settings are in config/initializers/smtp_settings.rb.sample
# Email address of your support contact (default: same as email_from)
support_email: <%= @gitlab_support_email %>
## User settings
default_projects_limit: <%= @gitlab_projects %>
# default_can_create_group: false # default: true
# default: true - User can change her username/namespace
username_changing_enabled: <%= @gitlab_username_change ? 'true' : 'false' %>
## Default theme
## BASIC = 1
## MARS = 2
## MODERN = 3
## GRAY = 4
## COLOR = 5
# default_theme: 2 # default: 2
## Users management
# default: false - Account passwords are not sent via the email if signup is enabled.
# signup_enabled: true
#
# default: true - If set to false, standard login form won't be shown on the sign-in page
# signin_enabled: false
# Restrict setting visibility levels for non-admin users.
# The default is to allow all levels.
<% if @restricted_visibility_levels %>
restricted_visibility_levels:
<% @restricted_visibility_levels.each do |level| %>
- <%= level %>
<% end %>
<% else %>
#restricted_visibility_levels: [ "public" ]
<% end %>
## Automatic issue closing
# If a commit message matches this regular expression, all issues referenced from the matched text will be closed.
# This happens when the commit is pushed or merged into the default branch of a project.
# When not specified the default issue_closing_pattern as specified below will be used.
# issue_closing_pattern: '([Cc]lose[sd]|[Ff]ixe[sd]) #(\d+)'
<% if @gitlab_issue_closing_pattern -%>
issue_closing_pattern: '<%= @gitlab_issue_closing_pattern.gsub("'","''") %>'
<% end -%>
## Default project features settings
default_projects_features:
issues: <%= @gitlab_default_projects_features_issues %>
merge_requests: <%= @gitlab_default_projects_features_merge_requests %>
wiki: <%= @gitlab_default_projects_features_wiki %>
wall: <%= @gitlab_default_projects_features_wall %>
snippets: <%= @gitlab_default_projects_features_snippets %>
# can be "private" | "internal" | "public"
visibility_level: <%= @gitlab_default_projects_features_visibility_level %>
## Webhook settings
# Number of seconds to wait for HTTP response after sending webhook HTTP POST request (default: 10)
webhook_timeout: <%= @gitlab_webhook_timeout %>
## Repository downloads directory
# When a user clicks e.g. 'Download zip' on a project, a temporary zip file is created in the following directory.
# The default is 'tmp/repositories' relative to the root of the Rails app.
repository_downloads_path: <%= @gitlab_repository_downloads_path %>
## External issues trackers
issues_tracker:
<% if @issues_tracker %>
<% @issues_tracker.keys.sort.each do |name| %>
<%= name %>:
<% @issues_tracker[name].keys.sort.each do |k| %>
<%= k %>: <%= @issues_tracker[name][k] -%>
<% end -%>
<% end -%>
<% else %>
# redmine:
# title: "Redmine"
# ## If not nil, link 'Issues' on project page will be replaced with this
# ## Use placeholders:
# ## :project_id - GitLab project identifier
# ## :issues_tracker_id - Project Name or Id in external issue tracker
# project_url: "http://redmine.sample/projects/:issues_tracker_id"
#
# ## If not nil, links from /#\d/ entities from commit messages will replaced with this
# ## Use placeholders:
# ## :project_id - GitLab project identifier
# ## :issues_tracker_id - Project Name or Id in external issue tracker
# ## :id - Issue id (from commit messages)
# issues_url: "http://redmine.sample/issues/:id"
#
# ## If not nil, links to creating new issues will be replaced with this
# ## Use placeholders:
# ## :project_id - GitLab project identifier
# ## :issues_tracker_id - Project Name or Id in external issue tracker
# new_issue_url: "http://redmine.sample/projects/:issues_tracker_id/issues/new"
#
# jira:
# title: "Atlassian Jira"
# project_url: "http://jira.sample/issues/?jql=project=:issues_tracker_id"
# issues_url: "http://jira.sample/browse/:id"
# new_issue_url: "http://jira.sample/secure/CreateIssue.jspa"
<% end %>
## Gravatar
gravatar:
enabled: <%= @gravatar_enabled %> # Use user avatar image from Gravatar.com (default: true)
# gravatar urls: possible placeholders: %{hash} %{size} %{email}
# plain_url: "http://..." # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
# ssl_url: "https://..." # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
#
# 2. Auth settings
# ==========================
## LDAP settings
# You can inspect a sample of the LDAP users with login access by running:
# bundle exec rake gitlab:ldap:check RAILS_ENV=production
ldap:
enabled: <%= @ldap_enabled %>
host: '<%= @ldap_host %>'
port: <%= @ldap_port %>
uid: '<%= @ldap_uid %>'
# "tls" or "ssl" or "plain"
method: '<%= @ldap_method %>'
<% if @ldap_bind_dn != '' -%>
bind_dn: '<%= @ldap_bind_dn %>'
password: '<%= @ldap_bind_password %>'
<% end -%>
# This setting specifies if LDAP server is Active Directory LDAP server.
# For non AD servers it skips the AD specific queries.
# If your LDAP server is not AD, set this to false.
active_directory: <%= @ldap_active_directory %>
# If allow_username_or_email_login is enabled, GitLab will ignore everything
# after the first '@' in the LDAP username submitted by the user on login.
#
# Example:
# - the user enters '[email protected]' and 'p@ssw0rd' as LDAP credentials;
# - GitLab queries the LDAP server with 'jane.doe' and 'p@ssw0rd'.
#
# If you are using "uid: 'userPrincipalName'" on ActiveDirectory you need to
# disable this setting, because the userPrincipalName contains an '@'.
allow_username_or_email_login: true
# To maintain tight control over the number of active users on your GitLab installation,
# enable this setting to keep new users blocked until they have been cleared by the admin
# (default: false).
block_auto_created_users: <%= @ldap_block_auto_created_users %>
# Base where we can search for users
#
# Ex. ou=People,dc=gitlab,dc=example
#
base: '<%= @ldap_base %>'
# Filter LDAP users
#
# Format: RFC 4515
# Ex. (employeeType=developer)
#
user_filter: '<%= @ldap_user_filter -%>'
# EE settings
<% if @ldap_sync_time!= '' -%>
sync_time: <%=@ldap_sync_time%>
<% end -%>
<% if @ldap_group_base!= '' -%>
group_base: <%=@ldap_group_base%>
<% end -%>
<% if @ldap_sync_ssh_keys!= '' -%>
sync_ssh_keys: <%=@ldap_sync_ssh_keys%>
<% end -%>
<% if @ldap_admin_group!= '' -%>
admin_group: <%=@ldap_admin_group%>
<% end -%>
## OmniAuth settings
omniauth:
<% if @omniauth -%>
<% @omniauth.keys.reject{|param| param=="providers"}.sort.each do |param| -%>
<%= param %>: <%= @omniauth[param] %>
<% end -%>
providers:
<% @omniauth["providers"] && @omniauth["providers"].each do |provider| -%>
-
<% provider.keys.reject{|key| key=="args"}.sort.each do |key| -%>
<%= key %>: <%= provider[key] %>
<% end -%>
args:
<% provider["args"] && provider["args"].keys.sort.each do |arg| -%>
<%= arg %>: <%= provider["args"][arg] %>
<% end -%>
<% end -%>
<% else %>
# Allow login via Twitter, Google, etc. using OmniAuth providers
enabled: false
# CAUTION!
# This allows users to login without having a user account first (default: false).
# User accounts will be created automatically when authentication was successful.
allow_single_sign_on: false
# Locks down those users until they have been cleared by the admin (default: true).
block_auto_created_users: true
## Auth providers
# Uncomment the following lines and fill in the data of the auth provider you want to use
# If your favorite auth provider is not listed you can use others:
# see https://github.com/gitlabhq/gitlab-public-wiki/wiki/Custom-omniauth-provider-configurations
# The 'app_id' and 'app_secret' parameters are always passed as the first two
# arguments, followed by optional 'args' which can be either a hash or an array.
# Documentation for this is available at http://doc.gitlab.com/ce/integration/omniauth.html
providers:
# - { name: 'google_oauth2', app_id: 'YOUR APP ID',
# app_secret: 'YOUR APP SECRET',
# args: { access_type: 'offline', approval_prompt: '' } }
# - { name: 'twitter', app_id: 'YOUR APP ID',
# app_secret: 'YOUR APP SECRET'}
# - { name: 'github', app_id: 'YOUR APP ID',
# app_secret: 'YOUR APP SECRET',
# args: { scope: 'user:email' } }
<% end %>
#
# 3. Advanced settings
# ==========================
# GitLab Satellites
satellites:
# Relative paths are relative to Rails.root (default: tmp/repo_satellites/)
path: <%= @gitlab_satellitedir %>/gitlab-satellites/
## Backup settings
backup:
# Relative paths are relative to Rails.root (default: tmp/backups/)
path: <%= @gitlab_backup_path %>
# default: 0 (forever) (in seconds)
keep_time: <%= @gitlab_backup_keep_time %>
## GitLab Shell settings
gitlab_shell:
path: <%= @git_home %>/gitlab-shell/
# REPOS_PATH MUST NOT BE A SYMLINK!!!
repos_path: <%= @gitlab_repodir %>/repositories/
hooks_path: <%= @git_home %>/gitlab-shell/hooks/
# File that contains the secret key for verifying access for gitlab-shell.
# Default is '.gitlab_shell_secret' relative to Rails.root (i.e. root of the GitLab app).
<% if @gitlab_secret_file -%>
secret_file: <%= @gitlab_secret_file %>
<% else -%>
# secret_file: /home/git/gitlab/.gitlab_shell_secret
<% end -%>
# Git over HTTP
upload_pack: true
receive_pack: true
# If you use non-standard ssh port you need to specify it
ssh_port: <%= @ssh_port %>
## Git settings
# CAUTION!
# Use the default values unless you really know what you are doing
git:
bin_path: <%= @git_bin_path %>
# The next value is the maximum memory size grit can use
# Given in number of bytes per git object (e.g. a commit)
# This value can be increased if you have very large commits
# 5.megabytes
max_size: <%= @git_max_size %>
# Git timeout to read a commit, in seconds
timeout: <%= @git_timeout %>
#
# 4. Extra customization
# ==========================
extra:
## Google analytics. Uncomment if you want it
<% if @google_analytics_id != '' %>
google_analytics_id: <%= @google_analytics_id %>
<% else %>
# google_analytics_id: '_your_tracking_id'
<% end %>
## Piwik analytics.
# piwik_url: '_your_piwik_url'
# piwik_site_id: '_your_piwik_site_id'
## Text under sign-in page (Markdown enabled)
<% if @company_logo_url != '' or @company_link != '' or @company_name != '' %>
sign_in_text: |
<% if @company_logo_url != '' %>
![Company Logo](<%= @company_logo_url %>)
<% end %>
<% if @company_name != '' and @company_link != '' %>
[Learn more about <%= @company_name %>](<%= @company_link %>)
<% elsif @company_name != '' %>
<%= @company_name %>
<% else %>
<%= @company_link %>
<% end %>
<% else %>
# sign_in_text: |
# ![Company Logo](http://www.companydomain.com/logo.png)
# [Learn more about CompanyName](http://www.companydomain.com/)
<% end %>
development:
<<: *base
test:
<<: *base
gravatar:
enabled: true
gitlab:
host: localhost
port: 80
issues_tracker:
redmine:
title: "Redmine"
project_url: "http://redmine/projects/:issues_tracker_id"
issues_url: "http://redmine/:project_id/:issues_tracker_id/:id"
new_issue_url: "http://redmine/projects/:issues_tracker_id/issues/new"
staging:
<<: *base