diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-08-14 11:59:10 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-08-14 11:59:10 +0300 |
commit | d9614e701a932881e3b64a1785f91e524499541d (patch) | |
tree | ceedc04fd754e0fdd6802a3d21328bc3b173739c /lib/tasks | |
parent | 2e03eac78e42dcd9230b68beeff987001fe42a96 (diff) | |
parent | eb1a3798adb3836e4ebe641c8eb962b6f7220004 (diff) |
Merge branch 'gitaly-install-path' into 'master'
Remove storage path dependency of gitaly install task
See merge request gitlab-org/gitlab-ce!21101
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/gitlab/gitaly.rake | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/lib/tasks/gitlab/gitaly.rake b/lib/tasks/gitlab/gitaly.rake index e9ca6404fe8..80de3d2ef51 100644 --- a/lib/tasks/gitlab/gitaly.rake +++ b/lib/tasks/gitlab/gitaly.rake @@ -1,13 +1,12 @@ namespace :gitlab do namespace :gitaly do desc "GitLab | Install or upgrade gitaly" - task :install, [:dir, :repo] => :gitlab_environment do |t, args| - require 'toml-rb' - + task :install, [:dir, :storage_path, :repo] => :gitlab_environment do |t, args| warn_user_is_not_gitlab - unless args.dir.present? - abort %(Please specify the directory where you want to install gitaly:\n rake "gitlab:gitaly:install[/home/git/gitaly]") + unless args.dir.present? && args.storage_path.present? + abort %(Please specify the directory where you want to install gitaly and the path for the default storage +Usage: rake "gitlab:gitaly:install[/installation/dir,/storage/path]") end args.with_defaults(repo: 'https://gitlab.com/gitlab-org/gitaly.git') @@ -27,7 +26,8 @@ namespace :gitlab do "BUNDLE_PATH=#{Bundler.bundle_path}") end - Gitlab::SetupHelper.create_gitaly_configuration(args.dir) + storage_paths = { 'default' => args.storage_path } + Gitlab::SetupHelper.create_gitaly_configuration(args.dir, storage_paths) Dir.chdir(args.dir) do # In CI we run scripts/gitaly-test-build instead of this command unless ENV['CI'].present? @@ -35,17 +35,5 @@ namespace :gitlab do end end end - - desc "GitLab | Print storage configuration in TOML format" - task storage_config: :environment do - require 'toml-rb' - - puts "# Gitaly storage configuration generated from #{Gitlab.config.source} on #{Time.current.to_s(:long)}" - puts "# This is in TOML format suitable for use in Gitaly's config.toml file." - - # Exclude gitaly-ruby configuration because that depends on the gitaly - # installation directory. - puts Gitlab::SetupHelper.gitaly_configuration_toml('', gitaly_ruby: false) - end end end |