diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-04-07 16:20:17 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-04-07 16:20:17 +0800 |
commit | 3aed06cfa387406c2e0257a8783bc05b53d4385a (patch) | |
tree | 91d12caf54a468bc272d92bca4542722a42e2033 /config | |
parent | 964814e99a30dd9fb0194e64cc01fee79bd027aa (diff) | |
parent | c970fa973d482c50820db75d08d74bd5c1e9d475 (diff) | |
download | gitlab-ce-3aed06cfa387406c2e0257a8783bc05b53d4385a.tar.gz |
Merge remote-tracking branch 'upstream/master' into test-pg-mysql
* upstream/master: (590 commits)
Fixes failing spec
Fix icon name error
Rewrite system note helper
Change edit icon
Leave icon area blank if legacy note; remove diamond icon
Fix positioning of note icons
Fix newline errors
Add remaining system note icons
Add system notes icon helper; add icons
Fixed specs Updated JS that was causing the hints to appear & then disappear
Update tests
Fix broken spinach test
Reuse code
Improve shortcuts code
Adds ShortcutsDashboardNavigation to globals comment since its a global variable
Fix shortcut specs
Reorganize shortcut help menu
Change todos shortcut to shift
Change shortcuts
Switch global shortcuts to shift; reuse key styles from help menu
...
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 1 | ||||
-rw-r--r-- | config/dependency_decisions.yml | 18 | ||||
-rw-r--r-- | config/gitlab.yml.example | 21 | ||||
-rw-r--r-- | config/initializers/0_inflections.rb | 2 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 37 | ||||
-rw-r--r-- | config/initializers/8_gitaly.rb | 8 | ||||
-rw-r--r-- | config/initializers/bullet.rb | 13 | ||||
-rw-r--r-- | config/routes/project.rb | 11 | ||||
-rw-r--r-- | config/routes/wiki.rb | 4 | ||||
-rw-r--r-- | config/webpack.config.js | 17 |
10 files changed, 99 insertions, 33 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/gitlab.yml.example b/config/gitlab.yml.example index 3747baf4c3b..3c70f35b9d0 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -180,6 +180,9 @@ production: &base # Flag stuck CI jobs as failed stuck_ci_jobs_worker: cron: "0 * * * *" + # Execute scheduled triggers + trigger_schedule_worker: + cron: "0 */12 * * *" # Remove expired build artifacts expire_build_artifacts_worker: cron: "50 * * * *" @@ -443,14 +446,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/private/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 +464,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 +573,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..4c9d829aa9f 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 @@ -311,6 +315,9 @@ Settings['cron_jobs'] ||= Settingslogic.new({}) Settings.cron_jobs['stuck_ci_jobs_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['stuck_ci_jobs_worker']['cron'] ||= '0 * * * *' Settings.cron_jobs['stuck_ci_jobs_worker']['job_class'] = 'StuckCiJobsWorker' +Settings.cron_jobs['trigger_schedule_worker'] ||= Settingslogic.new({}) +Settings.cron_jobs['trigger_schedule_worker']['cron'] ||= '0 */12 * * *' +Settings.cron_jobs['trigger_schedule_worker']['job_class'] = 'TriggerScheduleWorker' Settings.cron_jobs['expire_build_artifacts_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['expire_build_artifacts_worker']['cron'] ||= '50 * * * *' Settings.cron_jobs['expire_build_artifacts_worker']['job_class'] = 'ExpireBuildArtifactsWorker' @@ -345,13 +352,16 @@ Settings.cron_jobs['trending_projects_worker']['job_class'] = 'TrendingProjectsW Settings.cron_jobs['remove_unreferenced_lfs_objects_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['remove_unreferenced_lfs_objects_worker']['cron'] ||= '20 0 * * *' Settings.cron_jobs['remove_unreferenced_lfs_objects_worker']['job_class'] = 'RemoveUnreferencedLfsObjectsWorker' +Settings.cron_jobs['stuck_import_jobs_worker'] ||= Settingslogic.new({}) +Settings.cron_jobs['stuck_import_jobs_worker']['cron'] ||= '15 * * * *' +Settings.cron_jobs['stuck_import_jobs_worker']['job_class'] = 'StuckImportJobsWorker' # # 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 +384,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 +410,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 +433,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 +455,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/routes/project.rb b/config/routes/project.rb index 7244f851869..e38f0537143 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -221,7 +221,15 @@ constraints(ProjectUrlConstrainer.new) do end end - resources :container_registry, only: [:index, :destroy], constraints: { id: Gitlab::Regex.container_registry_reference_regex } + resources :container_registry, only: [:index, :destroy], + controller: 'registry/repositories' + + namespace :registry do + resources :repository, only: [] do + resources :tags, only: [:destroy], + constraints: { id: Gitlab::Regex.container_registry_reference_regex } + end + end resources :milestones, constraints: { id: /\d+/ } do member do @@ -250,6 +258,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 30e9e9c09b4..dc431e4d566 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -23,7 +23,6 @@ var config = { main: './main.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,13 +36,18 @@ 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', snippet: './snippet/snippet_bundle.js', + stl_viewer: './blob/stl_viewer.js', terminal: './terminal/terminal_bundle.js', u2f: ['vendor/u2f'], users: './users/users_bundle.js', vue_pipelines: './vue_pipelines_index/index.js', + issue_show: './issue_show/index.js', }, output: { @@ -52,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: [ @@ -64,7 +68,11 @@ var config = { { test: /\.svg$/, use: 'raw-loader' - } + }, { + test: /\.(worker.js|pdf)$/, + exclude: /node_modules/, + loader: 'file-loader', + }, ] }, @@ -105,6 +113,8 @@ var config = { 'environments_folder', 'issuable', 'merge_conflicts', + 'notebook_viewer', + 'pdf_viewer', 'vue_pipelines', ], minChunks: function(module, count) { @@ -162,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': '*' }, |