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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2020-12-10 11:04:55 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2020-12-10 15:46:03 +0300
commit451566532841a32f4386b4654a0504a86439b629 (patch)
treea14646a16f2e6957f357a9a4df85443d2a7ba282 /cmd/gitaly-hooks
parent12adbd9488916e8982f0ba64da2df6020db521dd (diff)
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.
Diffstat (limited to 'cmd/gitaly-hooks')
-rw-r--r--cmd/gitaly-hooks/hooks_test.go1
1 files changed, 0 insertions, 1 deletions
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)...)