This is a WebHooks Agent for open source project Larmo.
- Github (events: push, commit comment, issues, issue comment, pull request, deployment, deployment status, create, delete, fork, gollum)
- Bitbucket (events: push, issues, issue comment)
- Gitlab (event: push, tag, comments, issues, merge requests)
- Travis CI
- Scrutinizer CI (event: completed)
- Add support for more services:
- Jira
- Trello
The WebhookAgent is a simple PHP application ready to be deploy to different servers.
The best way - use Heroku Toolbelt https://toolbelt.heroku.com/
- Create empty git repository in this directory (if does not exists), type in console
git init
- Create heroku app, run command in console
heroku apps:create
- Install composer dependencies, type in console
composer install
- Commit all files, use command:
git commit -am "Save files for deploy"
- Deploy to heroku, run command:
git push heroku master
After deploying process you can verify that your site is running using the command heroku open
.
- Copy your deployed site URL.
- Go to Github, and select your repository. Go to Settings > Webhooks & Services > Add webhook (https://github.com/USER-NAME/REPO-NAME/settings/hooks/new)
- In field Payload URL put your site URL and add to end of URL /github, example full URL: http://still-reef-8508.herokuapp.com/github
- Select individual events, but check which events are supported in agent.
- Click 'Add webhook' button.
- Copy your deployed site URL.
- Go to Bitbucket, and select your repository. Go to Settings > Integrations > Webhooks > Add webhook (https://bitbucket.org/USER-NAME/REPO-NAME/admin/addon/admin/bitbucket-webhooks/bb-webhooks-repo-admin)
- In field URL put your site URL and add to end of URL /bitbucket, example full URL: http://still-reef-8508.herokuapp.com/bitbucket
- Choose from a full list of triggers, but check which events are supported in agent.
- Click 'Save' button.
- Copy your deployed site URL.
- Go to your Gitlab page, and select repository. Go to Settings > Web Hooks (https://your-gitlab-site/USER-NAME/REPO-NAME/hooks)
- In field URL put your site URL and add to end of URL /gitlab, example full URL: http://still-reef-8508.herokuapp.com/gitlab
- Choose from list of triggers, but check which events are supported in agent.
- Click 'Add Web Hook' button.
- Copy your deployed site URL.
- Open .travis file in your project, and add webhooks notifications, for example:
notifications:
webhooks: http://your-deployed-site.herokuapp.com/travis
- Save file, commit and push changes to your repository.
- Copy your deployed agent URL.
- Go to your repository settings on Scrutinizer and find 'Service Hooks' (example url: https://scrutinizer-ci.com/g/USER/REPO-NAME/settings/service-hooks).
- Click 'Add web-hook' button and paste agent URL. Save settings.