summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorKushal Pandya <kushalspandya@gmail.com>2017-04-06 09:46:50 +0000
committerKushal Pandya <kushalspandya@gmail.com>2017-04-06 09:46:50 +0000
commit18506d4b8b8bc780b3b1e4c61339af38b5c49bb2 (patch)
tree6aab0c83abe14064433c326996ccbe8097495454 /config
parentcd5b36d04e79ed8fcd649127e0d47e09ec325242 (diff)
parent49bdd8d63b577f079cdc47f7dd10ba83c677771a (diff)
downloadgitlab-ce-18506d4b8b8bc780b3b1e4c61339af38b5c49bb2.tar.gz
Merge branch 'master' into '18471-restrict-tag-pushes-protected-tags'
# Conflicts: # app/assets/javascripts/dispatcher.js # app/assets/stylesheets/pages/projects.scss
Diffstat (limited to 'config')
-rw-r--r--config/application.rb1
-rw-r--r--config/dependency_decisions.yml18
-rw-r--r--config/environments/test.rb3
-rw-r--r--config/gitlab.yml.example18
-rw-r--r--config/initializers/0_inflections.rb2
-rw-r--r--config/initializers/1_settings.rb31
-rw-r--r--config/initializers/8_gitaly.rb8
-rw-r--r--config/initializers/bullet.rb13
-rw-r--r--config/initializers/rspec_profiling.rb6
-rw-r--r--config/routes/project.rb5
-rw-r--r--config/routes/wiki.rb4
-rw-r--r--config/webpack.config.js28
12 files changed, 99 insertions, 38 deletions
diff --git a/config/application.rb b/config/application.rb
index f9f01b66473..f2ecc4ce77c 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -150,6 +150,7 @@ module Gitlab
# This is needed for gitlab-shell
ENV['GITLAB_PATH_OUTSIDE_HOOK'] = ENV['PATH']
+ ENV['GIT_TERMINAL_PROMPT'] = '0'
config.generators do |g|
g.factory_girl false
diff --git a/config/dependency_decisions.yml b/config/dependency_decisions.yml
index 072ed8a3864..fdba1f6541e 100644
--- a/config/dependency_decisions.yml
+++ b/config/dependency_decisions.yml
@@ -326,3 +326,21 @@
:why: https://github.com/domenic/opener/blob/1.4.3/LICENSE.txt
:versions: []
:when: 2017-02-21 22:33:41.729629000 Z
+- - :approve
+ - jszip
+ - :who: Phil Hughes
+ :why: https://github.com/Stuk/jszip/blob/master/LICENSE.markdown
+ :versions: []
+ :when: 2017-04-05 10:38:46.275721000 Z
+- - :approve
+ - jszip-utils
+ - :who: Phil Hughes
+ :why: https://github.com/Stuk/jszip-utils/blob/master/LICENSE.markdown
+ :versions: []
+ :when: 2017-04-05 10:39:32.676232000 Z
+- - :approve
+ - pako
+ - :who: Phil Hughes
+ :why: https://github.com/nodeca/pako/blob/master/LICENSE
+ :versions: []
+ :when: 2017-04-05 10:43:45.897720000 Z
diff --git a/config/environments/test.rb b/config/environments/test.rb
index fb25d3a8b14..a25c5016a3b 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,4 +1,7 @@
Rails.application.configure do
+ # Make sure the middleware is inserted first in middleware chain
+ config.middleware.insert_before('ActionDispatch::Static', 'Gitlab::Testing::RequestBlockerMiddleware')
+
# Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index ba7f6773985..4314e902564 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -443,14 +443,10 @@ production: &base
# Gitaly settings
gitaly:
- # The socket_path setting is optional and obsolete. When this is set
- # GitLab assumes it can reach a Gitaly services via a Unix socket at
- # this path. When this is commented out GitLab will not use Gitaly.
- #
- # This setting is obsolete because we expect it to be moved under
- # repositories/storages in GitLab 9.1.
- #
- # socket_path: tmp/sockets/gitaly.socket
+ # This setting controls whether GitLab uses Gitaly (new component
+ # introduced in 9.0). Eventually Gitaly use will become mandatory and
+ # this option will disappear.
+ enabled: false
#
# 4. Advanced settings
@@ -465,6 +461,7 @@ production: &base
storages: # You must have at least a `default` storage path.
default:
path: /home/git/repositories/
+ gitaly_address: unix:/home/git/gitlab/tmp/sockets/private/gitaly.socket # TCP connections are supported too (e.g. tcp://host:port)
## Backup settings
backup:
@@ -573,10 +570,15 @@ test:
# In order to setup it correctly you need to specify
# your system username you use to run GitLab
# user: YOUR_USERNAME
+ pages:
+ path: tmp/tests/pages
repositories:
storages:
default:
path: tmp/tests/repositories/
+ gitaly_address: unix:<%= Rails.root.join('tmp/sockets/private/gitaly.socket') %>
+ gitaly:
+ enabled: false
backup:
path: tmp/tests/backups
gitlab_shell:
diff --git a/config/initializers/0_inflections.rb b/config/initializers/0_inflections.rb
index d4197da3fa9..f977104ff9d 100644
--- a/config/initializers/0_inflections.rb
+++ b/config/initializers/0_inflections.rb
@@ -10,5 +10,5 @@
# end
#
ActiveSupport::Inflector.inflections do |inflect|
- inflect.uncountable %w(award_emoji project_statistics)
+ inflect.uncountable %w(award_emoji project_statistics system_note_metadata)
end
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 62020fa9a75..e8fef0000c1 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -79,6 +79,10 @@ class Settings < Settingslogic
value
end
+ def absolute(path)
+ File.expand_path(path, Rails.root)
+ end
+
private
def base_url(config)
@@ -178,7 +182,7 @@ if github_settings
end
Settings['shared'] ||= Settingslogic.new({})
-Settings.shared['path'] = File.expand_path(Settings.shared['path'] || "shared", Rails.root)
+Settings.shared['path'] = Settings.absolute(Settings.shared['path'] || "shared")
Settings['issues_tracker'] ||= {}
@@ -237,7 +241,7 @@ Settings['gitlab_ci'] ||= Settingslogic.new({})
Settings.gitlab_ci['shared_runners_enabled'] = true if Settings.gitlab_ci['shared_runners_enabled'].nil?
Settings.gitlab_ci['all_broken_builds'] = true if Settings.gitlab_ci['all_broken_builds'].nil?
Settings.gitlab_ci['add_pusher'] = false if Settings.gitlab_ci['add_pusher'].nil?
-Settings.gitlab_ci['builds_path'] = File.expand_path(Settings.gitlab_ci['builds_path'] || "builds/", Rails.root)
+Settings.gitlab_ci['builds_path'] = Settings.absolute(Settings.gitlab_ci['builds_path'] || "builds/")
Settings.gitlab_ci['url'] ||= Settings.send(:build_gitlab_ci_url)
#
@@ -251,7 +255,7 @@ Settings.incoming_email['enabled'] = false if Settings.incoming_email['enabled']
#
Settings['artifacts'] ||= Settingslogic.new({})
Settings.artifacts['enabled'] = true if Settings.artifacts['enabled'].nil?
-Settings.artifacts['path'] = File.expand_path(Settings.artifacts['path'] || File.join(Settings.shared['path'], "artifacts"), Rails.root)
+Settings.artifacts['path'] = Settings.absolute(Settings.artifacts['path'] || File.join(Settings.shared['path'], "artifacts"))
Settings.artifacts['max_size'] ||= 100 # in megabytes
#
@@ -265,14 +269,14 @@ Settings.registry['api_url'] ||= "http://localhost:5000/"
Settings.registry['key'] ||= nil
Settings.registry['issuer'] ||= nil
Settings.registry['host_port'] ||= [Settings.registry['host'], Settings.registry['port']].compact.join(':')
-Settings.registry['path'] = File.expand_path(Settings.registry['path'] || File.join(Settings.shared['path'], 'registry'), Rails.root)
+Settings.registry['path'] = Settings.absolute(Settings.registry['path'] || File.join(Settings.shared['path'], 'registry'))
#
# Pages
#
Settings['pages'] ||= Settingslogic.new({})
Settings.pages['enabled'] = false if Settings.pages['enabled'].nil?
-Settings.pages['path'] = File.expand_path(Settings.pages['path'] || File.join(Settings.shared['path'], "pages"), Rails.root)
+Settings.pages['path'] = Settings.absolute(Settings.pages['path'] || File.join(Settings.shared['path'], "pages"))
Settings.pages['https'] = false if Settings.pages['https'].nil?
Settings.pages['host'] ||= "example.com"
Settings.pages['port'] ||= Settings.pages.https ? 443 : 80
@@ -286,7 +290,7 @@ Settings.pages['external_https'] ||= false unless Settings.pages['external_http
#
Settings['lfs'] ||= Settingslogic.new({})
Settings.lfs['enabled'] = true if Settings.lfs['enabled'].nil?
-Settings.lfs['storage_path'] = File.expand_path(Settings.lfs['storage_path'] || File.join(Settings.shared['path'], "lfs-objects"), Rails.root)
+Settings.lfs['storage_path'] = Settings.absolute(Settings.lfs['storage_path'] || File.join(Settings.shared['path'], "lfs-objects"))
#
# Mattermost
@@ -350,8 +354,8 @@ Settings.cron_jobs['remove_unreferenced_lfs_objects_worker']['job_class'] = 'Rem
# GitLab Shell
#
Settings['gitlab_shell'] ||= Settingslogic.new({})
-Settings.gitlab_shell['path'] ||= Settings.gitlab['user_home'] + '/gitlab-shell/'
-Settings.gitlab_shell['hooks_path'] ||= Settings.gitlab['user_home'] + '/gitlab-shell/hooks/'
+Settings.gitlab_shell['path'] = Settings.absolute(Settings.gitlab_shell['path'] || Settings.gitlab['user_home'] + '/gitlab-shell/')
+Settings.gitlab_shell['hooks_path'] = Settings.absolute(Settings.gitlab_shell['hooks_path'] || Settings.gitlab['user_home'] + '/gitlab-shell/hooks/')
Settings.gitlab_shell['secret_file'] ||= Rails.root.join('.gitlab_shell_secret')
Settings.gitlab_shell['receive_pack'] = true if Settings.gitlab_shell['receive_pack'].nil?
Settings.gitlab_shell['upload_pack'] = true if Settings.gitlab_shell['upload_pack'].nil?
@@ -374,6 +378,11 @@ unless Settings.repositories.storages['default']
Settings.repositories.storages['default']['path'] ||= Settings.gitlab['user_home'] + '/repositories/'
end
+Settings.repositories.storages.values.each do |storage|
+ # Expand relative paths
+ storage['path'] = Settings.absolute(storage['path'])
+end
+
#
# The repository_downloads_path is used to remove outdated repository
# archives, if someone has it configured incorrectly, and it points
@@ -395,7 +404,7 @@ end
Settings['backup'] ||= Settingslogic.new({})
Settings.backup['keep_time'] ||= 0
Settings.backup['pg_schema'] = nil
-Settings.backup['path'] = File.expand_path(Settings.backup['path'] || "tmp/backups/", Rails.root)
+Settings.backup['path'] = Settings.absolute(Settings.backup['path'] || "tmp/backups/")
Settings.backup['archive_permissions'] ||= 0600
Settings.backup['upload'] ||= Settingslogic.new({ 'remote_directory' => nil, 'connection' => nil })
# Convert upload connection settings to use symbol keys, to make Fog happy
@@ -418,7 +427,7 @@ Settings.git['timeout'] ||= 10
# least. This setting is fed to 'rm -rf' in
# db/migrate/20151023144219_remove_satellites.rb
Settings['satellites'] ||= Settingslogic.new({})
-Settings.satellites['path'] = File.expand_path(Settings.satellites['path'] || "tmp/repo_satellites/", Rails.root)
+Settings.satellites['path'] = Settings.absolute(Settings.satellites['path'] || "tmp/repo_satellites/")
#
# Extra customization
@@ -440,7 +449,7 @@ Settings.rack_attack.git_basic_auth['bantime'] ||= 1.hour
# Gitaly
#
Settings['gitaly'] ||= Settingslogic.new({})
-Settings.gitaly['socket_path'] ||= ENV['GITALY_SOCKET_PATH']
+Settings.gitaly['enabled'] ||= false
#
# Webpack settings
diff --git a/config/initializers/8_gitaly.rb b/config/initializers/8_gitaly.rb
index 07dd30f0a24..42ec7240b0f 100644
--- a/config/initializers/8_gitaly.rb
+++ b/config/initializers/8_gitaly.rb
@@ -1,2 +1,6 @@
-# Make sure we initialize a Gitaly channel before Sidekiq starts multi-threaded execution.
-Gitlab::GitalyClient.channel unless Rails.env.test?
+require 'uri'
+
+# Make sure we initialize our Gitaly channels before Sidekiq starts multi-threaded execution.
+if Gitlab.config.gitaly.enabled || Rails.env.test?
+ Gitlab::GitalyClient.configure_channels
+end
diff --git a/config/initializers/bullet.rb b/config/initializers/bullet.rb
index 95e82966c7a..0ade7109420 100644
--- a/config/initializers/bullet.rb
+++ b/config/initializers/bullet.rb
@@ -1,6 +1,11 @@
-if ENV['ENABLE_BULLET']
- require 'bullet'
+if defined?(Bullet) && ENV['ENABLE_BULLET']
+ Rails.application.configure do
+ config.after_initialize do
+ Bullet.enable = true
- Bullet.enable = true
- Bullet.console = true
+ Bullet.bullet_logger = true
+ Bullet.console = true
+ Bullet.raise = Rails.env.test?
+ end
+ end
end
diff --git a/config/initializers/rspec_profiling.rb b/config/initializers/rspec_profiling.rb
index 70177995356..764c067c6f0 100644
--- a/config/initializers/rspec_profiling.rb
+++ b/config/initializers/rspec_profiling.rb
@@ -7,7 +7,11 @@ module RspecProfilingExt
module Git
def branch
- ENV['CI_COMMIT_REF_NAME'] || super
+ if ENV['CI_COMMIT_REF_NAME']
+ "#{defined?(Gitlab::License) ? 'ee' : 'ce'}:#{ENV['CI_COMMIT_REF_NAME']}"
+ else
+ super
+ end
end
end
diff --git a/config/routes/project.rb b/config/routes/project.rb
index f0735bf73e8..bf7d9570184 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -102,6 +102,7 @@ constraints(ProjectUrlConstrainer.new) do
get :merge_widget_refresh
post :cancel_merge_when_pipeline_succeeds
get :ci_status
+ get :pipeline_status
get :ci_environments_status
post :toggle_subscription
post :remove_wip
@@ -154,6 +155,7 @@ constraints(ProjectUrlConstrainer.new) do
post :cancel
post :retry
get :builds
+ get :status
end
end
@@ -166,7 +168,7 @@ constraints(ProjectUrlConstrainer.new) do
end
collection do
- get :folder, path: 'folders/:id'
+ get :folder, path: 'folders/*id', constraints: { format: /(html|json)/ }
end
end
@@ -250,6 +252,7 @@ constraints(ProjectUrlConstrainer.new) do
get :referenced_merge_requests
get :related_branches
get :can_create_branch
+ get :rendered_title
end
collection do
post :bulk_update
diff --git a/config/routes/wiki.rb b/config/routes/wiki.rb
index a6b3f5d4693..c2da84ff6f2 100644
--- a/config/routes/wiki.rb
+++ b/config/routes/wiki.rb
@@ -1,5 +1,3 @@
-WIKI_SLUG_ID = { id: /\S+/ }.freeze unless defined? WIKI_SLUG_ID
-
scope(controller: :wikis) do
scope(path: 'wikis', as: :wikis) do
get :git_access
@@ -8,7 +6,7 @@ scope(controller: :wikis) do
post '/', to: 'wikis#create'
end
- scope(path: 'wikis/*id', as: :wiki, constraints: WIKI_SLUG_ID, format: false) do
+ scope(path: 'wikis/*id', as: :wiki, format: false) do
get :edit
get :history
post :preview_markdown
diff --git a/config/webpack.config.js b/config/webpack.config.js
index d5580650545..0587a907896 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -18,12 +18,11 @@ var config = {
context: path.join(ROOT_PATH, 'app/assets/javascripts'),
entry: {
common: './commons/index.js',
- common_vue: ['vue', 'vue-resource'],
+ common_vue: ['vue', './vue_shared/common_vue.js'],
common_d3: ['d3'],
main: './main.js',
- blob_edit: './blob_edit/blob_edit_bundle.js',
+ blob: './blob_edit/blob_bundle.js',
boards: './boards/boards_bundle.js',
- simulate_drag: './test_utils/simulate_drag.js',
cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js',
commit_pipelines: './commit/pipelines/pipelines_bundle.js',
diff_notes: './diff_notes/diff_notes_bundle.js',
@@ -37,6 +36,9 @@ var config = {
merge_request_widget: './merge_request_widget/ci_bundle.js',
monitoring: './monitoring/monitoring_bundle.js',
network: './network/network_bundle.js',
+ notebook_viewer: './blob/notebook_viewer.js',
+ sketch_viewer: './blob/sketch_viewer.js',
+ pdf_viewer: './blob/pdf_viewer.js',
profile: './profile/profile_bundle.js',
protected_branches: './protected_branches/protected_branches_bundle.js',
protected_tags: './protected_tags',
@@ -45,6 +47,7 @@ var config = {
u2f: ['vendor/u2f'],
users: './users/users_bundle.js',
vue_pipelines: './vue_pipelines_index/index.js',
+ issue_show: './issue_show/index.js',
},
output: {
@@ -53,7 +56,7 @@ var config = {
filename: IS_PRODUCTION ? '[name].[chunkhash].bundle.js' : '[name].bundle.js'
},
- devtool: 'inline-source-map',
+ devtool: 'cheap-module-source-map',
module: {
rules: [
@@ -65,7 +68,11 @@ var config = {
{
test: /\.svg$/,
use: 'raw-loader'
- }
+ }, {
+ test: /\.(worker.js|pdf)$/,
+ exclude: /node_modules/,
+ loader: 'file-loader',
+ },
]
},
@@ -106,6 +113,8 @@ var config = {
'environments_folder',
'issuable',
'merge_conflicts',
+ 'notebook_viewer',
+ 'pdf_viewer',
'vue_pipelines',
],
minChunks: function(module, count) {
@@ -116,7 +125,11 @@ var config = {
// create cacheable common library bundle for all d3 chunks
new webpack.optimize.CommonsChunkPlugin({
name: 'common_d3',
- chunks: ['graphs', 'users', 'monitoring'],
+ chunks: [
+ 'graphs',
+ 'users',
+ 'monitoring',
+ ],
}),
// create cacheable common library bundles
@@ -133,7 +146,7 @@ var config = {
'empty_states': path.join(ROOT_PATH, 'app/views/shared/empty_states'),
'icons': path.join(ROOT_PATH, 'app/views/shared/icons'),
'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'),
- 'vue$': 'vue/dist/vue.common.js',
+ 'vue$': 'vue/dist/vue.esm.js',
}
}
}
@@ -159,6 +172,7 @@ if (IS_PRODUCTION) {
}
if (IS_DEV_SERVER) {
+ config.devtool = 'cheap-module-eval-source-map';
config.devServer = {
port: DEV_SERVER_PORT,
headers: { 'Access-Control-Allow-Origin': '*' },