Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a4aa6b8

Browse files
committedAug 22, 2019
Initial commit
0 parents  commit a4aa6b8

File tree

341 files changed

+61015
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

341 files changed

+61015
-0
lines changed
 

‎.babelrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"presets": ["es2015"],
3+
"plugins": [
4+
["transform-runtime", {
5+
"polyfill": false,
6+
"regenerator": true
7+
}]
8+
]
9+
}

‎.circleci/config.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
version: 2
2+
python_env: &python_env
3+
docker:
4+
- image: circleci/python:2.7-stretch-browsers
5+
6+
install_awscli: &install_awscli
7+
name: "Install awscli"
8+
command: |
9+
sudo pip install awscli --upgrade
10+
install_deploysuite: &install_deploysuite
11+
name: Installation of install_deploysuite.
12+
command: |
13+
git clone --branch master https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
14+
cp ./../buildscript/master_deploy.sh .
15+
cp ./../buildscript/buildenv.sh .
16+
cp ./../buildscript/awsconfiguration.sh .
17+
18+
# Instructions of deployment
19+
deploy_steps: &deploy_steps
20+
- checkout
21+
- attach_workspace:
22+
at: ./workspace
23+
- run: *install_awscli
24+
- run: *install_deploysuite
25+
- setup_remote_docker
26+
- run: docker build -t tc-project-service:latest .
27+
- deploy:
28+
name: "Running Masterscript - deploy tc-project-service "
29+
command: |
30+
./awsconfiguration.sh $DEPLOY_ENV
31+
source awsenvconf
32+
./buildenv.sh -e $DEPLOY_ENV -b ${VAR_ENV}-tc-project-service-deployvar
33+
source buildenvvar
34+
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${VAR_ENV}-global-appvar,${VAR_ENV}-tc-project-service-appvar -i tc-project-service -p FARGATE
35+
36+
echo "======= Running Masterscript - deploy tc-project-service-consumers ==========="
37+
if [ -e ${VAR_ENV}-tc-project-service-appvar.json ]; then sudo rm -vf ${VAR_ENV}-tc-project-service-appvar.json; fi
38+
./buildenv.sh -e $DEPLOY_ENV -b ${VAR_ENV}-tc-project-service-consumers-deployvar
39+
source buildenvvar
40+
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${VAR_ENV}-global-appvar,${VAR_ENV}-tc-project-service-appvar -i tc-project-service -p FARGATE
41+
42+
jobs:
43+
test:
44+
docker:
45+
- image: circleci/node:8.9.4
46+
- image: circleci/postgres:9.6.2-alpine
47+
environment:
48+
- POSTGRES_USER: circle_test
49+
- POSTGRES_DB: circle_test
50+
- image: elasticsearch:2.3
51+
environment:
52+
DB_MASTER_URL: postgres://circle_test:@127.0.0.1:5432/circle_test
53+
AUTH_SECRET: secret
54+
AUTH_DOMAIN: topcoder-dev.com
55+
LOG_LEVEL: debug
56+
APP_VERSION: v4
57+
steps:
58+
- checkout
59+
- restore_cache:
60+
key: test-node-modules-{{ checksum "package.json" }}
61+
- run: npm install
62+
- save_cache:
63+
key: test-node-modules-{{ checksum "package.json" }}
64+
paths:
65+
- node_modules
66+
- run: npm run lint
67+
- run: npm run test
68+
- run: npm run build
69+
- persist_to_workspace:
70+
root: .
71+
paths:
72+
- dist
73+
74+
deployProd:
75+
<<: *python_env
76+
environment:
77+
DEPLOY_ENV: "PROD"
78+
VAR_ENV: "prod"
79+
steps: *deploy_steps
80+
81+
deployDev:
82+
<<: *python_env
83+
environment:
84+
DEPLOY_ENV: "DEV"
85+
VAR_ENV: "dev"
86+
steps: *deploy_steps
87+
88+
workflows:
89+
version: 2
90+
build:
91+
jobs:
92+
- test
93+
- deployDev:
94+
context : org-global
95+
requires:
96+
- test
97+
filters:
98+
branches:
99+
only: ['dev', 'dev-sts']
100+
- deployProd:
101+
context : org-global
102+
requires:
103+
- test
104+
filters:
105+
branches:
106+
only: ['master']

0 commit comments

Comments
 (0)
This repository has been archived.