| {%- from "gerrit/map.jinja" import server with context %} |
| # This file is managed by salt. |
| |
| [gerrit] |
| basePath = git |
| canonicalWebUrl = {{ server.canonical_web_url }} |
| {%- if server.git_http_url is defined %} |
| gitHttpUrl = {{ server.git_http_url }} |
| {%- endif %} |
| {%- if server.canonical_git_url is defined %} |
| canonicalGitUrl = {{ server.canonical_git_url }} |
| {%- endif %} |
| {%- if server.can_load_in_iframe is defined %} |
| canLoadInIFrame = true |
| {%- endif %} |
| |
| {%- if server.core is defined %} |
| [core] |
| {%- if server.core.packed_git_limit is defined %} |
| packedGitLimit = {{ server.core.packed_git_limit }} |
| {%- endif %} |
| {%- if server.core.packed_git_window_size is defined %} |
| packedGitWindowSize = {{ server.core.packed_git_window_size }} |
| {%- endif %} |
| {%- if server.core.packed_git_open_files is defined %} |
| packedGitOpenFiles == {{ server.core.packed_git_open_files }} |
| {%- endif %} |
| {%- endif %} |
| |
| [database] |
| type = {{ server.database.engine }} |
| database = {{ server.database.name }} |
| {%- if server.database.engine != 'h2' %} |
| hostname = {{ server.database.host }} |
| username = {{ server.database.user }} |
| connectionpool = true |
| {%- if server.database.pool_limit is defined %} |
| poolLimit = {{ server.database.pool_limit }} |
| {%- endif %} |
| {%- if server.database.pool_max_idle is defined %} |
| poolMaxIdle = {{ server.database.pool_max_idle }} |
| {%- endif %} |
| {%- endif %} |
| |
| [auth] |
| {%- if server.get('contributor_agreement', False) %} |
| contributorAgreements = true |
| {%- endif %} |
| type = {{ server.auth.engine }} |
| cookieSecure = {{ server.auth.get('cookie_secure', 'true') }} |
| enableRunAs = {{ server.auth.get('enable_run_as', 'true') }} |
| {%- if server.auth.engine == 'OPENID_SSO' %} |
| openIdSsoUrl = {{ server.auth.openid_sso_url }} |
| {%- endif %} |
| |
| [sendemail] |
| {%- if server.mail is defined %} |
| smtpServer = {{ server.mail.host }} |
| from = {{ server.mail.from }} |
| includeDiff = {{ server.mail.include_diff }} |
| {%- else %} |
| enabled = false |
| {%- endif %} |
| |
| [container] |
| user = gerrit2 |
| {%- if server.java_home is defined %} |
| javaHome = {{ server.java_home }} |
| {%- endif %} |
| {%- if server.container_javaoptions is defined %} |
| javaOptions = {{ server.container_javaoptions }} |
| {%- endif %} |
| {%- if server.container_heaplimit is defined %} |
| heapLimit = {{ server.container_heaplimit }} |
| {%- endif %} |
| |
| [sshd] |
| listenAddress = {{ server.bind.address }} |
| {%- if server.get('sshd', {}).threads is defined %} |
| threads = {{ server.sshd.threads }} |
| {%- endif %} |
| {%- if server.get('sshd', {}).idle_timeout is defined %} |
| idleTimeout = {{ server.sshd.idle_timeout }} |
| {%- endif %} |
| {%- if server.get('sshd', {}).max_connections_per_user is defined %} |
| maxConnectionsPerUser = {{ server.sshd.max_connections_per_user }} |
| {%- endif %} |
| {%- if server.get('sshd', {}).batch_threads is defined %} |
| batchThreads = {{ server.sshd.batch_threads }} |
| {%- endif %} |
| {%- if server.get('sshd', {}).command_start_threads is defined %} |
| commandstartThreads = {{ server.sshd.command_start_threads }} |
| {%- endif %} |
| |
| [httpd] |
| {%- if server.httpd_listen_url is defined %} |
| listenUrl = {{ server.httpd_listen_url }} |
| {%- else %} |
| listenUrl = proxy-https://*:8082/ |
| {%- endif %} |
| {%- if server.httpd_maxwait is defined %} |
| maxWait = {{ server.httpd_maxwait }} |
| {%- endif %} |
| {%- if server.httpd_acceptorthreads is defined %} |
| acceptorThreads = {{ server.httpd_acceptorthreads }} |
| {%- endif %} |
| {%- if server.httpd_minthreads is defined %} |
| minThreads = {{ server.httpd_minthreads }} |
| {%- endif %} |
| {%- if server.httpd_maxthreads is defined %} |
| maxThreads = {{ server.httpd_maxthreads }} |
| {%- endif %} |
| {%- if server.httpd_maxqueued is defined %} |
| maxQueued = {{ server.httpd_maxqueued }} |
| {%- endif %} |
| |
| [cache] |
| directory = cache |
| |
| [cache "web_sessions"] |
| maxAge = 7days |
| |
| {%- if server.cache_diff_timeout is defined %} |
| [cache "diff"] |
| timeout = {{ server.cache_diff_timeout }} |
| {%- endif %} |
| |
| {%- if server.cache_diff_intraline_timeout is defined %} |
| [cache "diff_intraline"] |
| timeout = {{ server.cache_diff_intraline_timeout }} |
| {%- endif %} |
| |
| [user] |
| email = {{ server.email }} |
| |
| [change] |
| allowDrafts = {{ server.get('allow_drafts', True) }} |
| |
| [receive] |
| {%- if server.receive_max_object_size_limit is defined %} |
| maxObjectSizeLimit = {{ server.receive_max_object_size_limit }} |
| {%- endif %} |
| {%- if server.receive_timeout is defined %} |
| timeOut = {{ server.receive_timeout }} |
| {%- endif %} |
| |
| {%- for commentlink_name, commentlink in server.get('commentlink', {}).iteritems() %} |
| [commentlink "{{ commentlink_name }}"] |
| match = "{{ commentlink['match'] }}" |
| {%- if commentlink['link'] is defined %} |
| link = "{{ commentlink['link'] }}" |
| {%- endif %} |
| {%- if commentlink['html'] is defined %} |
| html = "{{ commentlink['html'] }}" |
| {%- endif %} |
| {%- endfor %} |
| |
| {%- for plugin_name, plugin in server.get('plugin', {}).iteritems() %} |
| {%- if plugin.url is defined %} |
| [{{ plugin_name }}] |
| url = {{ plugin.url }} |
| {%- endif %} |
| {%- endfor %} |
| |
| [theme] |
| backgroundColor = ffffff |
| topMenuColor = ffffff |
| textColor = 264d69 |
| trimColor = eef3f5 |
| selectionColor = d1e6ea |
| changeTableOutdatedColor = f5cccc |
| tableOddRowColor = ffffff |
| tableEvenRowColor = f5f5ff |
| |
| {%- if server.melody is defined %} |
| [melody] |
| monitoring = {{ server.melody.monitoring }} |
| session = {{ server.melody.session }} |
| |
| [plugin "javamelody"] |
| allowTopMenu = {{ server.enable_javamelody_top_menu }} |
| {%- endif %} |
| |
| {%- if server.ui is defined %} |
| [gitweb] |
| {%- if server.ui.engine == 'gitweb' %} |
| revision = "?p=${project}.git;a=commitdiff;h=${commit}" |
| {%- else %} |
| type = cgit |
| {%- endif %} |
| {%- if server.ui.repo_url is defined %} |
| url = "{{ server.ui.web_repo_url }}" |
| urlEncode = {{ server.ui.web_repo_url_encode }} |
| {%- endif %} |
| {%- endif %} |
| |
| {%- if server.contactstore is defined %} |
| [contactstore] |
| appsec = {{ server.contactstore.appsec }} |
| url = {{ server.contactstore.url }} |
| {%- endif %} |
| |
| {%- if server.secondary_index is defined %} |
| [index] |
| type = {{ server.secondary_index.type }} |
| {%- if server.index_threads > 1 %} |
| threads = {{ server.index_threads }} |
| {%- endif %} |
| {%- endif %} |
| |
| {%- if server.change_cleanup is defined %} |
| [changeCleanup] |
| abandonAfter = {{ server.change_cleanup.get('abandon_after', 0) }} |
| {%- endif %} |
| |
| [groups] |
| newGroupsVisibleToAll = {{ server.get('new_groups_visible_to_all', False) }} |
| |
| [mimetype "image/*"] |
| safe = true |
| |
| [mimetype "text/x-yaml"] |
| safe = true |
| |
| [mimetype "text/xml"] |
| safe = true |
| |
| [mimetype "application/xml"] |
| safe = true |
| |
| [mimetype "text/x-rst"] |
| safe = true |
| |
| [mimetype "text/plain"] |
| safe = true |
| |
| [mimetype "text/x-puppet"] |
| safe = true |
| |
| [mimetype "text/x-ini"] |
| safe = true |
| |
| [mimetype "text/x-properties"] |
| safe = true |
| |
| [mimetype "text/x-markdown"] |
| safe = true |
| |
| [mimetype "text/css"] |
| safe = true |