-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1074 from Sing-Li/travis-001
CI/CD pipeline initial implementation - #961 - READY FOR MERGE
- Loading branch information
Showing
13 changed files
with
199 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,38 @@ | ||
sudo: required | ||
language: node_js | ||
branches: | ||
only: | ||
- master | ||
node_js: | ||
- "0.10" | ||
|
||
- '0.10' | ||
before_install: | ||
- "curl https://install.meteor.com | /bin/sh" | ||
|
||
- curl https://install.meteor.com | /bin/sh | ||
- npm install -g npm@'>=2.13.5' | ||
script: | ||
- meteor add rocketchat:livechat | ||
- meteor add rocketchat:hubot | ||
- meteor build --server demo.rocket.chat ./ | ||
- if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then echo "Building PR $TRAVIS_PULL_REQUEST"; meteor build ../build; exit $?; fi | ||
- cd .travis | ||
- npm install | ||
- npm start | ||
- cd .. | ||
- meteor build ../build | ||
- cd .travis | ||
- sh ./namefiles.sh | ||
- cd .. | ||
- meteor add rocketchat:livechat | ||
- meteor add rocketchat:hubot | ||
- meteor build --server demo.rocket.chat ../build | ||
- cd .travis | ||
- sh ./namedemo.sh | ||
- cd .. | ||
after_deploy: | ||
- "curl -H \"Content-Type: application/json\" --data \"{'build': true}\" -X POST https://registry.hub.docker.com/u/singli/rocket.chat/trigger/$PUSHTOKEN/" | ||
deploy: | ||
provider: s3 | ||
access_key_id: "AKIAIKIA7H7D47KUHYCA" | ||
bucket: "rocketchatbuild" | ||
skip_cleanup: true | ||
local_dir: ../build | ||
on: | ||
branch: master | ||
secret_access_key: | ||
secure: LYA2XNdpHBTN/zs/71VWLr81b3Gb290PRIqQER72SZ3eQjDk0UpUUFkzK6mc6GkelXyqHRBRckmhBzVCEAO6KNIU9JHc9aUxyUbSt7OMTAZUZ8X36E7HL6mXN73YHtUCbEczD41aXMK+HQ9ol0EXfvbprp5gFwqT908dSVleNJCN6wZgW5ZJVzWTiC2/aaGqCrWhAWybG1XwCgl8ND8N3qFsNBZ6MDN3rpp9kVdDJ3vzp5Azkf6QrTFQTo2ai3DFFnRf7J84/8tpRL3tVcPwjik449KEkJlCPotxt7XxUTg9HrN5LQY4wYTKyKhoYxzADwse8VaU/oFhVef3A8AiLpfg8rR63ahs5ZOqJc926eiZWGumLfvcGkHD2kb+z+l9bIE8b2X7mct6gK4ub0E6Ul/NOoh1ZgppVzP3PuYZXGb2CNvZTrrSjH9dGWPWlRjZaErg4bs4BC6y6eGjgu1CqFa1eqLFO/oYdmX5c4kDskyNf0VSVVXmqLqQBWrkOGSr3Z8nR8XQ1PDQfmj8ZMmDRtvt58DuOVzOBkC71Mc/Kr/cKS0cXedwzzNg2BG4EHMsc1eTn6JWs95NFCbPbI5HzxYODumZwOwSJyXKiDgUhPmRc6I1MvgJqIIBGWFqIIGEfR715E4zaJzAYvTPWvL+8aBMfZxdQouRYH7d9kREc6U= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cd ../../build | ||
FILENAME=demo.rocket.chat-`cat version.txt`.tgz | ||
mv Rocket.Chat.tar.gz $FILENAME | ||
ln -s $FILENAME demo.rocket.chat-v.latest.tgz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cd ../../build | ||
FILENAME=rocket.chat-`cat version.txt`.tgz | ||
mv Rocket.Chat.tar.gz $FILENAME | ||
ln -s $FILENAME rocket.chat-v.latest.tgz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "setbuildinfo", | ||
"version": "1.0.0", | ||
"description": "Set the buildinfo.txt resource", | ||
"main": "setbuildinfo.js", | ||
"scripts": { | ||
"start": "node setbuildinfo.js" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"line-by-line": "^0.1.4", | ||
"mkdirp": "^0.5.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
var BUILD_INFO_PATH = '../public/buildinfo/buildinfo.txt'; | ||
var PACKAGES_PATH = '../.meteor/packages'; | ||
var BUILD_PATH = '../../build'; | ||
var LineByLineReader = require('line-by-line'), | ||
mkdirp = require('mkdirp'), | ||
fs = require('fs'), | ||
lr = new LineByLineReader(BUILD_INFO_PATH); | ||
|
||
var firstline = ""; | ||
|
||
|
||
if (process.env.TRAVIS_BUILD_NUMBER) { | ||
|
||
var transformVersion = function (firstline) { | ||
var versions = firstline.split("."); | ||
|
||
return versions[0] + '.' + versions[1] + '.' + process.env.TRAVIS_BUILD_NUMBER + '\n'; | ||
}; | ||
|
||
|
||
|
||
lr.on('error', function (err) { | ||
// 'err' contains error object | ||
}); | ||
|
||
lr.on('line', function (line) { | ||
if (firstline == "") | ||
firstline = line; | ||
|
||
}); | ||
|
||
lr.on('end', function () { | ||
|
||
var packages = fs.readFileSync(PACKAGES_PATH); | ||
var verinfo = transformVersion(firstline); | ||
var content = verinfo + packages; | ||
mkdirp.sync(BUILD_PATH); | ||
fs.writeFileSync(BUILD_PATH + "/version.txt", verinfo); | ||
fs.writeFileSync(BUILD_INFO_PATH, content); | ||
console.log('Version is ' + verinfo); | ||
|
||
}); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,29 @@ | ||
FROM meteorhacks/meteord:onbuild | ||
FROM node:0.10 | ||
|
||
MAINTAINER buildmaster@rocket.chat | ||
|
||
RUN groupadd -r rocketchat \ | ||
&& useradd -r -g rocketchat rocketchat \ | ||
&& mkdir /app | ||
|
||
# gpg: key 4FD08014: public key "Rocket.Chat Buildmaster <buildmaster@rocket.chat>" imported | ||
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 0E163286C20D07B9787EBE9FD7F9D0414FD08104 | ||
|
||
WORKDIR /app | ||
|
||
RUN curl -fSL "https://s3.amazonaws.com/rocketchatbuild/rocket.chat-v.latest.tgz" -o rocket.chat.tgz \ | ||
&& tar zxvf ./rocket.chat.tgz \ | ||
&& rm ./rocket.chat.tgz \ | ||
&& cd /app/bundle/programs/server \ | ||
&& npm install | ||
|
||
WORKDIR /app/bundle | ||
USER rocketchat | ||
|
||
# needs a mongoinstance - defaults to container linking with alias 'db' | ||
ENV MONGO_URL=mongodb://db:27017/meteor \ | ||
PORT=3000 \ | ||
ROOT_URL=http://localhost:3000 | ||
|
||
EXPOSE 3000 | ||
CMD ["node", "main.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
db: | ||
image: mongo | ||
# volumes: | ||
# - ./data/runtime/db:/data/db | ||
# - ./data/dump:/dump | ||
command: mongod --smallfiles | ||
|
||
rocketchat: | ||
image: rocketchat/rocket.chat | ||
image: singli/rocket.chat | ||
environment: | ||
- MONGO_URL=mongodb://mongodb/rocketchat | ||
- ROOT_URL=http://localhost:80 | ||
- MONGO_URL=mongodb://db:27017/rocketchat | ||
- ROOT_URL=http://yourhost:8818 | ||
links: | ||
- mongodb | ||
- db:db | ||
ports: | ||
- 80:80 | ||
- 8818:3000 | ||
|
||
mongodb: | ||
image: mongo | ||
ports: | ||
- 27017 |
54 changes: 27 additions & 27 deletions
54
packages/meteor-accounts-saml/.npm/package/npm-shrinkwrap.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.