Adapted heavily from: https://github.com/LegionSB/gitolite-campfire-notification
- Copy files to your gitolite user's .gitolite/hooks/common folder
- Rename config.yml.example to config.yml, and fill in your Hipchat account information
- Re-run "gitolite setup" (or "gl-setup" for g2) to propogate the hooks to each repo's hook folder
This method will allow you to use the config.yml for some (or all) of the configuration or the gitolite.conf configuration file for some (or all) of the config. This setup will also maintain the hooks in the gitolite-admin repository.
- As the gitolite user on the gitolite server:
- Update the GIT_CONFIG_KEYS variable in the ~/.gitolite.rc to include "hooks..*" (If this variable is already defined, regex matches are space separated)
- Add "LOCAL_CODE => "$ENV{HOME}/.gitolite/local-code"," to the ~/gitolite.rc
- In your checked out copy of the gitolite-admin repo:
- Create the local-code/hooks/common directory ("mkdir -p local-code/hooks/common")
- Copy the post-receive, post-receive-hipchat.rb, and config.yml (if desired) into this directory
- Configure
Individual repository variables will override the @all repository. Both will override settings in the config.yml.
config.yml example:
apitoken: '1234567890' room: "developers" notify: 0 from: "Gitolite" gitweburl: 'https://git.mycompany.com' proxyaddress: "1.2.3.4" proxyport: 83
gitolite.conf:
repo @all config hooks.hipchat.from = Git repo cool_project RW+ = @all config hooks.hipchat.room = CoolRoom repo puppet RW+ = @ops R = @all config hooks.hipchat.apitoken = 'asdfjkl' config hooks.hipchat.room = Ops
Note: Git config variables cannot have an underscore in them so there are some changes from the previous variable names.