Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 95dfab1

Browse files
Create config.yml
1 parent e66adcc commit 95dfab1

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

.circleci/config.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
version: 2
2+
defaults: &defaults
3+
docker:
4+
- image: circleci/node:6.14.3-stretch-browsers
5+
install_dependency: &install_dependency
6+
name: Installation of build and deployment dependencies.
7+
command: |
8+
sudo apt install jq
9+
sudo pip install awscli --upgrade
10+
11+
install_deploysuite: &install_deploysuite
12+
name: Installation of install_deploysuite.
13+
command: |
14+
git clone --branch v1.4 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
15+
cp ./../buildscript/master_deploy.sh .
16+
cp ./../buildscript/buildenv.sh .
17+
cp ./../buildscript/awsconfiguration.sh .
18+
restore_cache_settings_for_build: &restore_cache_settings_for_build
19+
key: docker-node-modules-la-{{ checksum "package-lock.json" }}
20+
21+
save_cache_settings: &save_cache_settings
22+
key: docker-node-modules-la-{{ checksum "package-lock.json" }}
23+
paths:
24+
- node_modules
25+
26+
builddeploy_steps: &builddeploy_steps
27+
- checkout
28+
- setup_remote_docker
29+
- run: *install_dependency
30+
- run: *install_deploysuite
31+
- restore_cache: *restore_cache_settings_for_build
32+
- run: docker build -t topcoder-x-receiver:latest .
33+
- save_cache: *save_cache_settings
34+
- deploy:
35+
name: Running MasterScript.
36+
command: |
37+
./awsconfiguration.sh $DEPLOY_ENV
38+
source awsenvconf
39+
./buildenv.sh -e $DEPLOY_ENV -b ${DEPLOY_ENV}-topcoder-x-receiver-deployvar
40+
source buildenvvar
41+
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s dev-global-appvar,${DEPLOY_ENV}-topcoder-x-receiver-appvar -i topcoder-x-receiver
42+
jobs:
43+
# Build & Deploy against development backend
44+
"build-dev":
45+
<<: *defaults
46+
environment:
47+
DEPLOY_ENV: "dev"
48+
steps: *builddeploy_steps
49+
50+
# Build & Deploy against production backend
51+
"build-prod":
52+
<<: *defaults
53+
environment:
54+
DEPLOY_ENV: "prod"
55+
steps: *builddeploy_steps
56+
57+
workflows:
58+
version: 2
59+
build:
60+
jobs:
61+
# Development builds are executed on "develop" branch only.
62+
- "build-dev":
63+
context : org-global
64+
filters:
65+
branches:
66+
only:
67+
- develop
68+
- "build-prod":
69+
context : org-global
70+
filters:
71+
branches:
72+
only:
73+
- master

0 commit comments

Comments
 (0)