Commit a9b6cc83 authored by Ricardo Rocha's avatar Ricardo Rocha
Browse files

Merge branch 'enable-gitlab-hooks' into 'master'

enable and document gitlab hubot hooks

See merge request !4
parents 6e300b39 0124c72d
......@@ -24,11 +24,13 @@ RUN yo hubot --owner="cloud devs <cloud-developers@cern.ch>" --name="nimbus" --d
# add adapters and scripts
RUN npm install hubot-xmpp --save && npm install
RUN npm install hubot-youtube --save && npm install
RUN npm install hubot-gitlab-hooks --save && npm install
# activate scripts
ADD hubot-scripts.json /hubot/
ADD external-scripts.json /hubot/
ADD scripts/hubot-jira-issues.coffee /hubot/scripts/
ADD scripts/hubot-gitlab.coffee /hubot/scripts/
EXPOSE 8080
CMD bin/hubot -a xmpp
......@@ -11,9 +11,13 @@ Replace the password below twice (jabber and jira).
```
ssh root@nimbus.cern.ch
yum install -y docker
sudo docker run --name hubot -e HUBOT_XMPP_HOST=conference.jabber.cern.ch -e HUBOT_XMPP_PORT=5222 -e HUBOT_XMPP_USERNAME=nimbus@jabber.cern.ch -e HUBOT_XMPP_PASSWORD=<password-here> -e HUBOT_XMPP_ROOMS='cloud-infrastructure@conference.jabber.cern.ch' -e HUBOT_JIRA_URL=https://its.cern.ch/jira -e HUBOT_JIRA_USERNAME=nimbus -e HUBOT_JIRA_PASSWORD=<password-here> -e HUBOT_YOUTUBE_API_KEY=<youtube-api-key-here> rochaporto/hubot
sudo docker run -d --name hubot --net=host -p 8080:8080/tcp -e HUBOT_XMPP_HOST=conference.jabber.cern.ch -e HUBOT_XMPP_PORT=5222 -e HUBOT_XMPP_USERNAME=nimbus@jabber.cern.ch -e HUBOT_XMPP_PASSWORD=<password-here> -e HUBOT_XMPP_ROOMS='cloud-infrastructure@conference.jabber.cern.ch' -e HUBOT_JIRA_URL=https://its.cern.ch/jira -e HUBOT_JIRA_USERNAME=nimbus -e HUBOT_JIRA_PASSWORD=<password-here> -e HUBOT_YOUTUBE_API_KEY=<youtube-apikey-here> -e GITLAB_CHANNEL='cloud-infrastructure@conference.jabber.cern.ch' -e GITLAB_DEBUG=1 -e HUBOT_LOG_LEVEL=debug rochaporto/hubot
```
## Enabling gitlab hooks
Under the project you want to enable this for, go to Settings, Web Hooks and add http://nimbus.cern.ch:8080/gitlab/web for 'Merge Request' events (or whatever you want).
## Extending
Follow one of the recipes below to update the Dockerfile, then rebuild and push the updated docker image:
......
......@@ -2,6 +2,7 @@
"hubot-diagnostics",
"hubot-help",
"hubot-heroku-keepalive",
"hubot-gitlab-hooks",
"hubot-google-images",
"hubot-google-translate",
"hubot-pugme",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment