Gitlab 11+ hooks issues
slonopotamus opened this issue · comments
-
git-as-svn doesn't know anymore where GitLab hooks are located. Workaround:
repositoryMapping: !gitlabMapping template: pusher: !pushEmbedded hooksPath: /opt/gitlab/embedded/service/gitaly-ruby/git-hooks
-
Hooks require Ruby on
$PATH
. Workaround: addPATH="/bin:/usr/bin:/opt/gitlab/embedded/bin"
to/etc/default/git-as-svn
-
Hooks require
GITLAB_SHELL_DIR
environment variable. Workaround: addGITLAB_SHELL_DIR=/opt/gitlab/embedded/service/gitlab-shell
to/etc-default/git-as-svn
do you mean GITLAB_SHELL_DIR=/opt/gitlab/embedded/service/gitlab-shell to /etc/default/git-as-svn?
Yes. This stuff was added to docs: https://bozaro.github.io/git-as-svn/htmlsingle/git-as-svn.html#_configuration
Yes. This stuff was added to docs: https://bozaro.github.io/git-as-svn/htmlsingle/git-as-svn.html#_configuration
Looks like this doesn't work anymore. After upgrading Gitlab to 12.9.1-ce.0 and git-as-svn to 1.25.0 all my svn commits fail due to a hook issue:
Transmitting file data .done
Committing transaction...
svn: E165001: Commit failed (details follow):
svn: E165001: Hook /opt/gitlab/embedded/service/gitaly-ruby/git-hooks/pre-receive failed with output:
/opt/gitlab/embedded/service/gitaly-ruby/git-hooks/pre-receive: 4: exec: /gitaly-hooks: not found
pre-receive
is a link to gitlab-shell-hook
:
#!/bin/sh
# This is the single source of truth for where Gitaly's embedded Git hooks are.
exec "$GITALY_BIN_DIR/gitaly-hooks" "$(basename $0)" "$@"
The problem is that GITALY_BIN_DIR
is not defined on its invocation. I tried to define it in /etc/default/git-as-svn
GITLAB_BIN_DIR=/opt/gitlab/embedded/bin
, but it doesn't help. Any idea how to fix this?
Oh maaan, when they will stop moving this stuff around...
Could you please file a separate issue?
Could you please file a separate issue?
Sure