stable

Clone or download

Read-only

Deploy a new pre-receive hook inside every git repository

In this patch we deploy a new pre-receive hook inside every existing and future git repository, a unit test is provided to test the creation of the hooks. At this stage the hook does nothing but log the information related to the incoming git objects, later it will be used to execute custom WASM modules. How to test: - make bash-web - tuleap-cfg site-deploy:gitolite3-hooks - You should see the following message if the symlinks do not exist: [info] Creating post-receive hook symlink at /var/lib/gitolite/.gitolite/hooks/common/post-receive [info] Creating pre-receive hook symlink at /var/lib/gitolite/.gitolite/hooks/common/pre-receive [info] Executing gitolite setup --hooks-only - When you push something in one of your git repository, the push should be accepted - You should see a new entry in /var/log/tuleap/codendi_syslog, it should be of the form [debug] [pre-receive-wasm] <repository_path> <user_name> <old_rev> <new_rev> <refname> Part of story #31077 deploy a WebAssembly module to validate incoming references as a pre-receive hook Change-Id: I94d9e168a4d34e7da99d36ab9684ef93e060d674

Modified Files

Name
A plugins/git/etc/sudoers.d/tuleap-git-prereceive +3 −0 Go to diff View file
A plugins/git/hooks/pre-receive +22 −0 Go to diff View file
A plugins/git/hooks/pre-receive.php +51 −0 Go to diff View file
M src/tuleap-cfg/Command/SiteDeploy/Gitolite3/SiteDeployGitolite3Hooks.php +21 −11 Go to diff View file
A tests/unit/tuleap-cfg/Command/SiteDeploy/SiteDeployGitolite3HooksTest.php +80 −0 Go to diff View file
M tools/rpm/tuleap.rhel7.spec +2 −0 Go to diff View file