Skip to content

Commit

Permalink
Merge pull request #41 Version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robsonbittencourt committed Nov 29, 2016
2 parents 3962b1e + 1d4fe59 commit 6686674
Show file tree
Hide file tree
Showing 56 changed files with 1,819 additions and 886 deletions.
18 changes: 18 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
engines:
duplication:
enabled: true
config:
languages:
javascript:
mass_threshold: 70

fixme:
enabled: true
ratings:
paths:
- "**.js"
- "**.module"
exclude_paths:
- config/
- test/
26 changes: 13 additions & 13 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
node_modules

test

.editorconfig

.gitignore

.travis.yml

LICENSE

README.md
node_modules

test

.editorconfig

.gitignore

.travis.yml

LICENSE

README.md
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ root = true
charset = utf-8
insert_final_newline = true
indent_style = space
indent_size = 3
end_of_line = crlf
indent_size = 2
end_of_line = lf
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "hubot-js"
}
52 changes: 15 additions & 37 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,15 @@
# Logs
*.log
npm-debug.log*
hubot.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history
# Logs
*.log

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Dependency directories
node_modules

hubot.db

.vscode
17 changes: 17 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Logs
*.log

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Dependency directories
node_modules

hubot.db

.vscode

/media
54 changes: 37 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
sudo: required

language: node_js
node_js:
- "5.11"

services:
- docker

after_success:
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" ;
docker build -t robsonbittencourt/hubot.js:latest . ;
docker push docker.io/robsonbittencourt/hubot.js:latest ;
fi

- 'npm run coveralls'
sudo: required

language: node_js

node_js:
- 7.1.0

services:
- docker

script:
- npm run lint
- npm test

after_success:
- npm run coveralls

deploy:
provider: npm
email: "[email protected]"
api_key:
secure: PNVxGGp2oUF/XVy81PiBDeJsytnMu8lTiUImX6tkgqepPm6OKjKUau7vNsTH6shYGMm7bo/S6RvOAuqYZiYWbm3k1PZK/GIlHqq/zSsNV6B4fo3F1w9BpMN8xOS+kfHcpeyhm1LO0wUk4iFhzIIlmUmrMR5dBaBz6jCQj6aKFl1yRKNRzSxl4NfKA5N3mR5yPI852XR6d1nHlWafvo6Q3+7+hcedoQn8wzxmHmRWxdWUT7NG/LcoYjpGWR3zNg0/4buMuHCze+kGwQBTZnUXAN2fPBHRq+57e9Vsbxz4UK/zvaUs8wuDCppFUJ0qDtA2Jh3sM19WG97y3kETNC6mtDSdfpiszlb37ipp2/ilx8Db5KV7PGB+8tXUvjt2510o+l/ZUk/MWd3GTk5m9Og5CGTDrCZTLW6DlRmBTgew9Bssdyid2SkfkR20cU1AgsBFRLAhI/qI0CGXcLQTsnWGhKo2zqTOdZEteKgo/U/Js7N/R7TTFjPakeslxq4DmrYiMDIiwtMDRLPTHXPq0NoDq+s7BKPeIui3cS9kNxPqlHzsSh/91qrfnGphhQbHMMt0LZ/Kws53MPqSrWfgcclI0eqE9a6kNGiu+QxmOMTtud+KREo2gidq5Aa8mzHUYro8FtQfO2kCDwDD0KnqNTjVN2R7atuBmc25q6LL6INloWo=
on:
branch: master

after_deploy:
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" ;

export VERSION=$(node -p -e "JSON.parse(require('fs').readFileSync('package.json', 'utf8')).version")

docker build --build-arg version=${VERSION} -t robsonbittencourt/hubot.js:latest -t robsonbittencourt/hubot.js:${VERSION} . ;

docker push docker.io/robsonbittencourt/hubot.js:latest ;

docker push docker.io/robsonbittencourt/hubot.js:${VERSION} ;
fi
22 changes: 9 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
FROM alpine

RUN apk add --update bash nodejs curl && rm -rf /var/cache/apk/*

WORKDIR /hubot

COPY ./package.json /hubot/

RUN npm install --production

COPY ./ /hubot/

CMD BOT_API_TOKEN=$BOT_API_TOKEN BOT_NAME=$BOT_NAME node app.js
FROM node:7.1.0-alpine

RUN apk add --update bash curl && rm -rf /var/cache/apk/*

ARG version

RUN npm install -g hubot.js@$version

CMD hubot start --t $BOT_API_TOKEN --n $BOT_NAME && tail -F -n0 /etc/hosts
Loading

0 comments on commit 6686674

Please sign in to comment.