summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2020-09-11 10:00:01 +0200
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2020-09-11 10:04:44 +0200
commitdeff4a449f358031f1c13b8afb573524cb0f99d9 (patch)
tree6b8d942e3099034c4cce05549339fd516ea5b4b2
parent98b173cdaebf7b5256a855f7e6bae7f41c73517a (diff)
downloadgitlab-shell-deff4a449f358031f1c13b8afb573524cb0f99d9.tar.gz
hooks: Remove deprecated hooks dirzj-remove-hooks-dir
Over a year ago, through e0824f17367a44e5bac84dac7197f9b45e37ab01, the hooks in this repository were updated to not be successful, basically block each push from happening. This change removes the hooks, and updates the documentation. There's no customer impact, and these changes are just part of a general cleanup.
-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
-