hubot #164

Open
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+41 −0
Split
@@ -23,6 +23,8 @@ create_swarm_security_group(){
openstack security group rule create --proto tcp --dst-port 2376 --src-ip 10.0.0.0/8 $SWARM_SECGROUP
# 3376 is the default port used by swarm nodes
openstack security group rule create --proto tcp --dst-port 3376 --src-ip 10.0.0.0/8 $SWARM_SECGROUP
+ # hubot port
+ openstack security group rule create --proto tcp --dst-port 9090 --src-ip 10.0.0.0/8 $SWARM_SECGROUP
}
create_options(){
@@ -11,3 +11,6 @@ services:
jenkins-slave-xenial:
build: ../../containers/jenkins-slave-xenial
+
+ hubot:
+ build: ../../containers/hubot
@@ -36,3 +36,15 @@ services:
extends: jenkins-slave-vivid
image: ubuntucore/snappy-jenkins-slave-xenial
command: -username admin -password snappy -executors 2 -name jenkins-slave-xenial-1 -labels xenial -master http://jenkins-master-service:8080
+
+ hubot:
+ image: fgimenez/hubot
+ ports:
+ - 9090:9090
+ restart: always
+ environment:
+ - TELEGRAM_TOKEN
+ - HUBOT_LOG_LEVEL
+ - HUBOT_JENKINS_URL
+ - HUBOT_JENKINS_AUTH
+ - "constraint:public==yes"
@@ -0,0 +1,18 @@
+FROM node:latest
+
+RUN npm install -g yo generator-hubot
+
+ENV PORT 9090
+
+RUN useradd -ms /bin/bash nodeuser
+RUN mkdir /home/nodeuser/hubot && chown nodeuser:nodeuser /home/nodeuser/hubot
+WORKDIR /home/nodeuser/hubot
+USER nodeuser
+
+RUN yo hubot --owner "Snappy Developers" --adapter "telegram" --name "snappy_bot" --description "Snappy m-o"
+RUN npm install hubot-diagnostics hubot-help hubot-jenkins hubot-jenkins-notifier --save
+ADD external-scripts.json /home/nodeuser/hubot/external-scripts.json
+
+EXPOSE $PORT
+
+CMD ["/home/nodeuser/hubot/bin/hubot", "-a", "telegram"]
@@ -0,0 +1,6 @@
+[
+ "hubot-diagnostics",
+ "hubot-help",
+ "hubot-jenkins",
+ "hubot-jenkins-notifier"
+]