From 451566532841a32f4386b4654a0504a86439b629 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 10 Dec 2020 09:04:55 +0100 Subject: hooks: Remove GITLAB_SHELL_DIR from environment Back when hooks were still implemented via gitlab-shell, the GITLAB_SHELL_DIR environment variable was used to tell the hooks where to find the configuration file as well as the gitlab-shell secret. This was used for example to call out to the GitLab API. Nowadays we don't use gitlab-shell for this anymore, but instead only use our Go hooks. As such, it's not necessary anymore to pass along the configuration, so we can now remove both the environment variable as well as supporting code. There is one outlier in this patch, which is the GITLAB_PROJECT_TIMEOUT configuration, which is used to timeout repository mirroring. It's not anything inherent to the gitlab-shell and in fact it's only used in a single place. So let's just inline it and be done -- it's not currently configurable anyway. --- cmd/gitaly-hooks/hooks_test.go | 1 - 1 file changed, 1 deletion(-) (limited to 'cmd/gitaly-hooks') diff --git a/cmd/gitaly-hooks/hooks_test.go b/cmd/gitaly-hooks/hooks_test.go index 3e6088dbd..47c73425a 100644 --- a/cmd/gitaly-hooks/hooks_test.go +++ b/cmd/gitaly-hooks/hooks_test.go @@ -53,7 +53,6 @@ func envForHooks(t testing.TB, gitlabShellDir string, repo *gitalypb.Repository, fmt.Sprintf("GL_REPOSITORY=%s", glHookValues.GLRepo), fmt.Sprintf("GL_PROTOCOL=%s", glHookValues.GLProtocol), fmt.Sprintf("GL_USERNAME=%s", glHookValues.GLUsername), - fmt.Sprintf("GITALY_GITLAB_SHELL_DIR=%s", gitlabShellDir), fmt.Sprintf("%s=%s", gitalylog.GitalyLogDirEnvKey, gitlabShellDir), }...) env = append(env, hooks.GitPushOptions(gitPushOptions)...) -- cgit v1.2.3