summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Drozdov <idrozdov@gitlab.com>2020-09-11 10:22:56 +0000
committerIgor Drozdov <idrozdov@gitlab.com>2020-09-11 10:22:56 +0000
commitf100e7e83943b3bb5db232f5bf79a616fdba88f1 (patch)
tree6b8d942e3099034c4cce05549339fd516ea5b4b2
parent98b173cdaebf7b5256a855f7e6bae7f41c73517a (diff)
parentdeff4a449f358031f1c13b8afb573524cb0f99d9 (diff)
downloadgitlab-shell-f100e7e83943b3bb5db232f5bf79a616fdba88f1.tar.gz
Merge branch 'zj-remove-hooks-dir' into 'master'
hooks: Remove deprecated hooks dir See merge request gitlab-org/gitlab-shell!411
-rw-r--r--README.md19
-rwxr-xr-xhooks/post-receive4
-rwxr-xr-xhooks/pre-receive4
-rwxr-xr-xhooks/update4
4 files changed, 0 insertions, 31 deletions
diff --git a/README.md b/README.md
index 531a074..53fb37a 100644
--- a/README.md
+++ b/README.md
@@ -18,25 +18,6 @@ An overview of the four cases described above:
1. git pull over SSH -> gitlab-shell -> API call to gitlab-rails (Authorization) -> accept or decline -> establish Gitaly session
1. git push over SSH -> gitlab-shell (git command is not executed yet) -> establish Gitaly session -> (in Gitaly) gitlab-shell pre-receive hook -> API call to gitlab-rails (authorization) -> accept or decline push
-## Git hooks
-
-The gitlab-shell repository used to also contain the
-Git hooks that allow GitLab to validate Git pushes (e.g. "is this user
-allowed to push to this protected branch"). These hooks also trigger
-events in GitLab (e.g. to start a CI pipeline after a push).
-
-We are in the process of moving these hooks to Gitaly, because Git hooks
-require direct disk access to Git repositories, and that is only
-possible on Gitaly servers. It makes no sense to have to install
-gitlab-shell on Gitaly servers.
-
-As of GitLab 11.10 [the actual Git hooks are in the Gitaly
-repository](https://gitlab.com/gitlab-org/gitaly/tree/v1.22.0/ruby/vendor/gitlab-shell/hooks),
-but gitlab-shell must still be installed on Gitaly servers because the
-hooks rely on configuration data (e.g. the GitLab internal API URL) that
-is not yet available in Gitaly itself. Also see the [transition
-plan](https://gitlab.com/gitlab-org/gitaly/issues/1226#note_126519133).
-
## Code status
[![pipeline status](https://gitlab.com/gitlab-org/gitlab-shell/badges/master/pipeline.svg)](https://gitlab.com/gitlab-org/gitlab-shell/-/pipelines?ref=master)
diff --git a/hooks/post-receive b/hooks/post-receive
deleted file mode 100755
index 73740da..0000000
--- a/hooks/post-receive
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-echo "The gitlab-shell hooks have been migrated to Gitaly, see https://gitlab.com/gitlab-org/gitaly/issues/1226"
-exit 1
-
diff --git a/hooks/pre-receive b/hooks/pre-receive
deleted file mode 100755
index 73740da..0000000
--- a/hooks/pre-receive
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-echo "The gitlab-shell hooks have been migrated to Gitaly, see https://gitlab.com/gitlab-org/gitaly/issues/1226"
-exit 1
-
diff --git a/hooks/update b/hooks/update
deleted file mode 100755
index 73740da..0000000
--- a/hooks/update
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-echo "The gitlab-shell hooks have been migrated to Gitaly, see https://gitlab.com/gitlab-org/gitaly/issues/1226"
-exit 1
-