Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2019-07-09 19:41:55 +0300
committerJacob Vosmaer <jacob@gitlab.com>2019-07-09 19:41:55 +0300
commit0ebbb0191773e6a1727add034dffd41ef9eab99c (patch)
treedaae3ca1882b538bfd7845ec04fc61c8f955857f
parent46856e1fd24d25f22289beefa472736aadc38652 (diff)
wip add back old env varsjv-hook-env-vars
-rw-r--r--internal/rubyserver/rubyserver.go1
-rw-r--r--ruby/gitlab-shell/lib/gitlab_init.rb4
-rw-r--r--ruby/lib/gitlab/config.rb2
-rw-r--r--ruby/lib/gitlab/git/hook.rb1
4 files changed, 6 insertions, 2 deletions
diff --git a/internal/rubyserver/rubyserver.go b/internal/rubyserver/rubyserver.go
index 475c6a087..9cbf1bdf5 100644
--- a/internal/rubyserver/rubyserver.go
+++ b/internal/rubyserver/rubyserver.go
@@ -109,6 +109,7 @@ func Start() (*Server, error) {
"GITALY_RUBY_GIT_BIN_PATH="+command.GitPath(),
fmt.Sprintf("GITALY_RUBY_WRITE_BUFFER_SIZE=%d", streamio.WriteBufferSize),
fmt.Sprintf("GITALY_RUBY_MAX_COMMIT_OR_TAG_MESSAGE_SIZE=%d", helper.MaxCommitOrTagMessageSize),
+ "GITALY_RUBY_GITLAB_SHELL_PATH="+cfg.GitlabShell.Dir,
"GITALY_RUBY_GITALY_BIN_DIR="+cfg.BinDir,
"GITALY_VERSION="+version.GetVersion(),
"GITALY_GIT_HOOKS_DIR="+hooks.Path())
diff --git a/ruby/gitlab-shell/lib/gitlab_init.rb b/ruby/gitlab-shell/lib/gitlab_init.rb
index 8dc50567a..08a1048f7 100644
--- a/ruby/gitlab-shell/lib/gitlab_init.rb
+++ b/ruby/gitlab-shell/lib/gitlab_init.rb
@@ -1,4 +1,6 @@
-ROOT_PATH = ENV.fetch('GITALY_GITLAB_SHELL_DIR', File.expand_path('..', __dir__))
+# GITLAB_SHELL_DIR has been deprecated
+ROOT_PATH = ENV['GITALY_GITLAB_SHELL_DIR'] || ENV['GITLAB_SHELL_DIR'] || File.expand_path('..', __dir__)
+
LOG_PATH = ENV.fetch('GITALY_LOG_DIR', "")
LOG_LEVEL = ENV.fetch('GITALY_LOG_LEVEL', "")
LOG_FORMAT = ENV.fetch('GITALY_LOG_FORMAT', "")
diff --git a/ruby/lib/gitlab/config.rb b/ruby/lib/gitlab/config.rb
index 8d32924af..2a710b5bb 100644
--- a/ruby/lib/gitlab/config.rb
+++ b/ruby/lib/gitlab/config.rb
@@ -41,7 +41,7 @@ module Gitlab
include TestSetup
def path
- @path ||= ENV['GITALY_GITLAB_SHELL_DIR']
+ @path ||= ENV['GITALY_GITLAB_SHELL_DIR'] || ENV['GITALY_RUBY_GITLAB_SHELL_PATH']
end
def git_timeout
diff --git a/ruby/lib/gitlab/git/hook.rb b/ruby/lib/gitlab/git/hook.rb
index a60f30001..3691f8639 100644
--- a/ruby/lib/gitlab/git/hook.rb
+++ b/ruby/lib/gitlab/git/hook.rb
@@ -103,6 +103,7 @@ module Gitlab
def env_base_vars(gl_id, gl_username)
{
'GITALY_GITLAB_SHELL_DIR' => Gitlab.config.gitlab_shell.path,
+ 'GITLAB_SHELL_DIR' => Gitlab.config.gitlab_shell.path,
'GITALY_LOG_DIR' => Gitlab.config.logging.dir,
'GITALY_LOG_LEVEL' => Gitlab.config.logging.level,
'GITALY_LOG_FORMAT' => Gitlab.config.logging.format,