Skip to content

Commit

Permalink
Merge pull request #1240 from AdaptiveConsulting/develop
Browse files Browse the repository at this point in the history
Release current Dev into Master (Demo)
  • Loading branch information
bhavesh-desai-scratch authored Oct 30, 2019
2 parents 3e655aa + d6edb35 commit 565edf1
Show file tree
Hide file tree
Showing 306 changed files with 22,621 additions and 7,960 deletions.
42 changes: 31 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ jobs:
enabled: true
steps:
- checkout
- run:
name: 'Configure the environment'
command: |
# Inject a dummy user for builds triggered from forks, because secure variables are not available there.
# This allows the job to proceed with building and testing docker images.
if [[ -n "${CIRCLE_PR_REPONAME}" ]] ; then
echo 'export DOCKER_USER=adaptive' >> $BASH_ENV
fi
- run:
name: Create network
command: 'docker network create -d bridge circleci'
Expand All @@ -29,6 +37,9 @@ jobs:
- run:
name: Build bot
command: 'cd ./src/server/Adaptive.ReactiveTrader.Server.Bot/ && docker build -t ${DOCKER_USER}/bot:${CIRCLE_BUILD_NUM} .'
- run:
name: Build nlp
command: 'cd ./src/node-server/ && docker build -t ${DOCKER_USER}/nlp:${CIRCLE_BUILD_NUM} -f ./Nlp.Dockerfile .'
- run:
name: Run broker
command: 'docker run -d --net circleci --name broker ${DOCKER_USER}/broker:${CIRCLE_BUILD_NUM}'
Expand Down Expand Up @@ -77,17 +88,25 @@ jobs:
- run:
name: Run client tests
command: 'docker run -e CI=true ${DOCKER_USER}/client-test${CIRCLE_BUILD_NUM} npm run test -- --coverage'
- run:
name: 'Skip the next steps for PRs'
command: |
# Check the environment and gracefully stop the job for PRs
if [[ "$CIRCLE_BRANCH" != "master" ]] && [[ "$CIRCLE_BRANCH" != "develop" ]] ; then
circleci-agent step halt
fi
- run:
name: Push images to dockerhub
command:
'echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin &&
docker push ${DOCKER_USER}/client:${CIRCLE_BUILD_NUM} &&
docker push ${DOCKER_USER}/pricehistory:${CIRCLE_BUILD_NUM} &&
docker push ${DOCKER_USER}/bot:${CIRCLE_BUILD_NUM} &&
docker push ${DOCKER_USER}/servers:${CIRCLE_BUILD_NUM} &&
docker push ${DOCKER_USER}/broker:${CIRCLE_BUILD_NUM} &&
docker push ${DOCKER_USER}/eventstore:${CIRCLE_BUILD_NUM} &&
docker push ${DOCKER_USER}/nginx:${CIRCLE_BUILD_NUM}'
command: |
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
docker push ${DOCKER_USER}/client:${CIRCLE_BUILD_NUM}
docker push ${DOCKER_USER}/pricehistory:${CIRCLE_BUILD_NUM}
docker push ${DOCKER_USER}/bot:${CIRCLE_BUILD_NUM}
docker push ${DOCKER_USER}/nlp:${CIRCLE_BUILD_NUM}
docker push ${DOCKER_USER}/servers:${CIRCLE_BUILD_NUM}
docker push ${DOCKER_USER}/broker:${CIRCLE_BUILD_NUM}
docker push ${DOCKER_USER}/eventstore:${CIRCLE_BUILD_NUM}
docker push ${DOCKER_USER}/nginx:${CIRCLE_BUILD_NUM}
- run:
name: Store build number
command: |
Expand Down Expand Up @@ -121,8 +140,8 @@ jobs:
- run:
name: Update images
command: |
kubectl --namespace=${NAMESPACE} set image deployments/broker-deployment broker=${DOCKER_USER}/broker:${BUILD_NUM}
kubectl --namespace=${NAMESPACE} set image deployments/eventstore-deployment eventstore=${DOCKER_USER}/eventstore:${BUILD_NUM}
kubectl --namespace=${NAMESPACE} set image deployments/broker-deployment broker=${DOCKER_USER}/broker:${BUILD_NUM}
kubectl --namespace=${NAMESPACE} set image deployments/eventstore-deployment eventstore=${DOCKER_USER}/eventstore:${BUILD_NUM}
kubectl --namespace=${NAMESPACE} set image deployments/web-deployment web=${DOCKER_USER}/nginx:${BUILD_NUM}
kubectl --namespace=${NAMESPACE} set image deployments/client-deployment client=${DOCKER_USER}/client:${BUILD_NUM}
kubectl --namespace=${NAMESPACE} set image deployments/referencedataread-deployment referencedataread=${DOCKER_USER}/servers:${BUILD_NUM}
Expand All @@ -133,6 +152,7 @@ jobs:
kubectl --namespace=${NAMESPACE} set image deployments/tradeexecution-deployment tradeexecution=${DOCKER_USER}/servers:${BUILD_NUM}
kubectl --namespace=${NAMESPACE} set image deployments/pricehistory-deployment pricehistory=${DOCKER_USER}/pricehistory:${BUILD_NUM}
kubectl --namespace=${NAMESPACE} set image deployments/bot-deployment bot=${DOCKER_USER}/bot:${BUILD_NUM}
workflows:
version: 2
main:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
src/client/node_modules
node_modules/
src/client/coverage
.idea/
.vs/
Expand All @@ -22,3 +22,4 @@ obj/
deploy/**/docker-compose.yml
*.pyc
*.sln
lerna-debug.log
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Reactive Trader Cloud
# Reactive Trader Cloud [![CircleCI](https://circleci.com/gh/AdaptiveConsulting/ReactiveTraderCloud/tree/develop.svg?style=svg&circle-token=801547883329d22e505634493b58b26fbb742e46)](https://circleci.com/gh/AdaptiveConsulting/ReactiveTraderCloud/tree/develop)

## Overview

Expand Down
11 changes: 11 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
parserPreset: {
parserOpts: {
issuePrefixes: ['ARTP-']
}
},
rules: {
'references-empty': [1, 'never']
}
};
9 changes: 7 additions & 2 deletions docs/setup/windows-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ If you want to persist data across sessions then you should run a local Event St
#### Run Broker (Crossbar)
Crossbar.io is required for RTC to properly run. If not installed, the server cannot communicate with the client.
To install crossbar.io:
- [Download Crossbar](http://crossbar.io/docs/Installation-on-Windows/) - !!!Use Python 3.x as 2.7 is no longer supported!!!
- You may find this link helpful: https://www.lfd.uci.edu/~gohlke/pythonlibs/
- [Download Crossbar](http://crossbar.io/docs/Installation-on-Windows/): At the time of writing, the download instructions for Crossbar on Windows aren't perfect. The following should work:
- [Install Python 3.x 32bit](https://www.python.org/), tick the 'Add Python to PATH' checkbox in the installer
- [Install PyWin](https://github.com/mhammond/pywin32/releases)
- The dependency 'snappy' doesn't build on Windows, so use a pre-built version:
- [Download snappy binary](https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-snappy) (choose the appropriate binary for your version of Python)
- Install it: `pip install python_snappy-0.5.4-cp37-cp37m-win32.whl` (or whichever `whl` file you downloaded in the previous step)
- Install Crossbar: `pip install crossbar`
- Run `crossbar start` from the `\src\services\broker\.crossbar` working directory on the command line

#### Run Services
Expand Down
5 changes: 5 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": "1.0.0",
"npmClient": "npm",
"packages": ["src/client", "src/node-server/*"]
}
Loading

0 comments on commit 565edf1

Please sign in to comment.