Skip to content

Commit

Permalink
Merge pull request #565 from assistify/merge/0.73
Browse files Browse the repository at this point in the history
Merge Rocket.Chat 0.73
  • Loading branch information
vickyokrm committed Mar 1, 2019
2 parents 50f028e + caed703 commit 0860b10
Show file tree
Hide file tree
Showing 1,910 changed files with 28,913 additions and 17,664 deletions.
229 changes: 138 additions & 91 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,81 @@
defaults: &defaults
working_directory: ~/repo

attach_workspace: &attach_workspace
at: /tmp

test-install-dependencies: &test-install-dependencies
name: Install dependencies
command: |
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
echo "deb [ arch=amd64 ] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google.list
echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org-shell google-chrome-stable
test-run: &test-run
name: Run Tests
command: |
if [[ $DISABLE_SMARTI ]]; then rm -rf ./tests/end-to-end/ui_smarti; fi;
npm test
test-npm-install: &test-npm-install
name: NPM install
command: |
npm install
test-store_artifacts: &test-store_artifacts
path: .screenshots/

test-configure-replicaset: &test-configure-replicaset
name: Configure Replica Set
command: |
mongo --eval 'rs.initiate({_id:"rs0", members: [{"_id":1, "host":"localhost:27017"}]})'
mongo --eval 'rs.status()'
test-docker-image: &test-docker-image
circleci/node:8.11-browsers

test: &test
<<: *defaults
environment: &test-environment
TEST_MODE: "true"
MONGO_URL: mongodb://localhost:27017/rocketchat
RETRY_TESTS: 5

test-with-oplog: &test-with-oplog
<<: *test
environment:
<<: *test-environment
MONGO_OPLOG_URL: mongodb://localhost:27017/local

steps:
- attach_workspace: *attach_workspace
- checkout
- run: *test-install-dependencies
- run: *test-configure-replicaset
- run: *test-npm-install
- run: *test-run
- store_artifacts: *test-store_artifacts

test-without-oplog: &test-without-oplog
<<: *test
steps:
- attach_workspace: *attach_workspace
- checkout
- run: *test-install-dependencies
- run: *test-npm-install
- run: *test-run
- store_artifacts: *test-store_artifacts


version: 2
jobs:
build:
<<: *defaults
docker:
- image: circleci/node:8.9
- image: circleci/node:8.11

steps:
- checkout
Expand Down Expand Up @@ -132,100 +201,65 @@ jobs:
- store_artifacts:
path: /tmp/build

test-with-oplog:
<<: *defaults
docker:
- image: circleci/node:8.9-browsers
- image: mongo:3.4
command: [mongod, --nojournal, --noprealloc, --smallfiles, --replSet=rs0]

environment:
TEST_MODE: "true"
MONGO_URL: mongodb://localhost:27017/rocketchat
MONGO_OPLOG_URL: mongodb://localhost:27017/local
RETRY_TESTS: 5

steps:
- attach_workspace:
at: /tmp

- checkout

- run:
name: Install dependencies
command: |
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64 ] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google.list
echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org-shell google-chrome-stable
- run:
name: Configure Replica Set
command: |
mongo --eval 'rs.initiate({_id:"rs0", members: [{"_id":1, "host":"localhost:27017"}]})'
mongo --eval 'rs.status()'
- run:
name: NPM install
command: |
npm install

- run:
name: Run Tests
command: |
if [[ $DISABLE_SMARTI ]]; then rm -rf ./tests/end-to-end/ui_smarti; fi;
npm test
test-with-oplog-mongo-3-2:
<<: *test-with-oplog
docker:
- image: *test-docker-image
- image: mongo:3.2
command: [mongod, --noprealloc, --smallfiles, --replSet=rs0]

- store_artifacts:
path: .screenshots/
test-with-oplog-mongo-3-4:
<<: *test-with-oplog
docker:
- image: *test-docker-image
- image: mongo:3.4
command: [mongod, --noprealloc, --smallfiles, --replSet=rs0]

test-without-oplog:
<<: *defaults
test-with-oplog-mongo-3-6:
<<: *test-with-oplog
docker:
- image: circleci/node:8.9-browsers
- image: circleci/mongo:3.4
- image: *test-docker-image
- image: mongo:3.6
command: [mongod, --noprealloc, --smallfiles, --replSet=rs0]

environment:
TEST_MODE: "true"
MONGO_URL: mongodb://localhost:27017/testwithoplog
RETRY_TESTS: 5
test-with-oplog-mongo-4-0:
<<: *test-with-oplog
docker:
- image: *test-docker-image
- image: mongo:4.0
command: [mongod, --noprealloc, --smallfiles, --replSet=rs0]

steps:
- attach_workspace:
at: /tmp

- checkout
test-without-oplog-mongo-3-2:
<<: *test-without-oplog
docker:
- image: *test-docker-image
- image: mongo:3.2

- run:
name: Install dependencies
command: |
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64 ] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google.list
echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org-shell google-chrome-stable
test-without-oplog-mongo-3-4:
<<: *test-without-oplog
docker:
- image: *test-docker-image
- image: mongo:3.4

- run:
name: NPM install
command: |
npm install
test-without-oplog-mongo-3-6:
<<: *test-without-oplog
docker:
- image: *test-docker-image
- image: mongo:3.6

- run:
name: Run Tests
command: |
if [[ $DISABLE_SMARTI ]]; then rm -rf ./tests/end-to-end/ui_smarti; fi;
npm test
test-without-oplog-mongo-4-0:
<<: *test-without-oplog
docker:
- image: *test-docker-image
- image: mongo:4.0

- store_artifacts:
path: .screenshots/

deploy:
<<: *defaults
docker:
- image: circleci/node:8.9
- image: circleci/node:8.11

steps:
- attach_workspace:
Expand Down Expand Up @@ -281,7 +315,7 @@ jobs:
docker build -t assistify/chat:$CIRCLE_TAG .
docker push assistify/chat:$CIRCLE_TAG
# # echo "Build preview Docker image"
# # echo "Build preview Docker image"
# # cp ~/repo/.docker-mongo/Dockerfile .
# # cp ~/repo/.docker-mongo/entrypoint.sh .
# # docker build -t assistify/chat.preview:$CIRCLE_TAG .
Expand Down Expand Up @@ -362,32 +396,45 @@ jobs:
workflows:
version: 2
build:
build-and-test:
jobs:
- build:
filters:
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]-[0-9]+\.[0-9]+\.[0-9]+$/
- test-with-oplog:
only: /^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/
- test-with-oplog-mongo-3-2: &test-mongo
requires:
- build
filters:
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]-[0-9]+\.[0-9]+\.[0-9]+$/
- test-without-oplog:
only: /^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/
- test-with-oplog-mongo-3-4: &test-mongo-no-pr
requires:
- build
filters:
branches:
only: develop
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]-[0-9]+\.[0-9]+\.[0-9]+$/
only: /^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/
- test-with-oplog-mongo-3-6: *test-mongo-no-pr
- test-with-oplog-mongo-4-0: *test-mongo
- test-without-oplog-mongo-3-2: *test-mongo-no-pr
- test-without-oplog-mongo-3-4: *test-mongo-no-pr
- test-without-oplog-mongo-3-6: *test-mongo-no-pr
- test-without-oplog-mongo-4-0: *test-mongo-no-pr
- deploy:
requires:
- image-build
- test-with-oplog-mongo-3-2
- test-with-oplog-mongo-3-4
- test-with-oplog-mongo-3-6
- test-with-oplog-mongo-4-0
- test-without-oplog-mongo-3-2
- test-without-oplog-mongo-3-4
- test-without-oplog-mongo-3-6
- test-without-oplog-mongo-4-0
filters:
branches:
only:
- develop
- master
only: develop
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]-[0-9]+\.[0-9]+\.[0-9]+$/
- image-build:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/setartname.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ elif [[ $CIRCLE_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
else
SNAP_CHANNEL=edge
RC_RELEASE=develop
RC_VERSION=0.66.0-develop
RC_VERSION="$(npm run version --silent)"
fi

export SNAP_CHANNEL
Expand Down
6 changes: 3 additions & 3 deletions .circleci/snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ echo -e "Tag: $CIRCLE_TAG\r\nBranch: $CIRCLE_BRANCH\r\nBuild: $CIRCLE_BUILD_NUM\
git clone -b $SNAP_CHANNEL git+ssh://rocket.chat.buildmaster@git.launchpad.net/rocket.chat launchpad

# Rarely will change, but just incase we copy it all
cp -r resources buildinfo launchpad/
sed s/#{RC_VERSION}/$RC_VERSION/ snapcraft.yaml > launchpad/snapcraft.yaml
cp -r resources buildinfo snap launchpad/
sed s/#{RC_VERSION}/$RC_VERSION/ snap/snapcraft.yaml > launchpad/snap/snapcraft.yaml
sed s/#{RC_VERSION}/$RC_VERSION/ resources/prepareRocketChat > launchpad/resources/prepareRocketChat

cd launchpad
git add resources snapcraft.yaml buildinfo
git add resources snap buildinfo

# Set commit author details
git config user.email "buildmaster@rocket.chat"
Expand Down
3 changes: 3 additions & 0 deletions .circleci/update-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ IFS=$'\n\t'
curl -X POST \
-H "X-Update-Token: ${UPDATE_TOKEN}" \
https://releases.rocket.chat/update

# Makes build fail if the release isn't there
curl --fail https://releases.rocket.chat/$RC_VERSION/info
2 changes: 1 addition & 1 deletion .docker/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM registry.access.redhat.com/rhscl/nodejs-8-rhel7

ENV RC_VERSION 0.71.1
ENV RC_VERSION 0.73.2

MAINTAINER buildmaster@rocket.chat

Expand Down
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ packages/rocketchat-livechat/.app/node_modules
packages/rocketchat-livechat/.app/.meteor
packages/rocketchat-livechat/assets/rocketchat-livechat.min.js
packages/rocketchat-livechat/assets/rocket-livechat.js
packages/rocketchat-theme/client/minicolors/jquery.minicolors.js
packages/rocketchat_theme/client/minicolors/jquery.minicolors.js
packages/rocketchat_theme/client/vendor/
packages/rocketchat-ui/client/lib/customEventPolyfill.js
packages/rocketchat-ui/client/lib/Modernizr.js
packages/rocketchat-ui/client/lib/recorderjs/recorder.js
packages/rocketchat-videobridge/client/public/external_api.js
packages/rocketchat-theme/client/vendor/
packages/tap-i18n/lib/tap_i18next/tap_i18next-1.7.3.js
private/moment-locales/
public/livechat/
Expand Down
Loading

0 comments on commit 0860b10

Please sign in to comment.