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

Commit fe95d47

Browse files
authored
Merge pull request #26 from topcoder-platform/master
backfilling yaml
2 parents 2ce82ac + 82165f4 commit fe95d47

File tree

1 file changed

+41
-51
lines changed

1 file changed

+41
-51
lines changed

.circleci/config.yml

Lines changed: 41 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,80 @@
11
version: 2
22
defaults: &defaults
33
docker:
4-
- image: docker:18.06-git
4+
- image: circleci/python:2.7-stretch-browsers
55
install_dependency: &install_dependency
6-
name: Installation of build and deployment dependencies.
7-
command: |
8-
apk add --no-cache bash curl
9-
apk add --no-cache jq py-pip sudo
10-
sudo pip install awscli --upgrade
11-
sudo pip install docker-compose
6+
name: Installation of build and deployment dependencies.
7+
command: |
8+
sudo apt install jq
9+
sudo pip install awscli --upgrade
10+
sudo pip install docker-compose
1211
install_deploysuite: &install_deploysuite
13-
name: Installation of install_deploysuite.
14-
command: |
15-
git clone --branch v1.3 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
16-
cp ./../buildscript/master_deploy.sh .
17-
cp ./../buildscript/buildenv.sh .
18-
cp ./../buildscript/awsconfiguration.sh .
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 .
1918
restore_cache_settings_for_build: &restore_cache_settings_for_build
20-
key: docker-node-modules-lp-{{ checksum "package-lock.json" }}
19+
key: docker-node-modules-{{ checksum "package-lock.json" }}
2120

2221
save_cache_settings: &save_cache_settings
23-
key: docker-node-modules-lp-{{ checksum "package-lock.json" }}
22+
key: docker-node-modules-{{ checksum "package-lock.json" }}
2423
paths:
2524
- node_modules
2625

27-
jobs:
28-
# Build & Deploy against development backend
29-
"build-dev":
30-
<<: *defaults
31-
steps:
26+
builddeploy_steps: &builddeploy_steps
3227
- checkout
3328
- setup_remote_docker
3429
- run: *install_dependency
3530
- run: *install_deploysuite
3631
- restore_cache: *restore_cache_settings_for_build
37-
- run: ./build.sh
32+
- run: ./build.sh ${APPNAME}
3833
- save_cache: *save_cache_settings
3934
- deploy:
4035
name: Running MasterScript.
4136
command: |
42-
#git clone --branch v1.1 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
43-
#cp ./../buildscript/master_deploy.sh .
44-
#./master_deploy.sh -d ECS -e DEV -t latest -s leaderboard-processor -i leaderboard-processor
45-
./awsconfiguration.sh DEV
37+
./awsconfiguration.sh $DEPLOY_ENV
4638
source awsenvconf
47-
./buildenv.sh -e DEV -b dev-leaderboard-processor-deployvar
39+
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
4840
source buildenvvar
49-
./master_deploy.sh -d ECS -e DEV -t latest -s dev-global-appvar,dev-leaderboard-processor-appvar -i leaderboard-processor
41+
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}
42+
43+
44+
jobs:
45+
# Build & Deploy against development backend
46+
"build-dev":
47+
<<: *defaults
48+
environment:
49+
DEPLOY_ENV: "DEV"
50+
LOGICAL_ENV: "dev"
51+
APPNAME: "leaderboard-processor"
52+
steps: *builddeploy_steps
5053

51-
# Build & Deploy against production backend
5254
"build-prod":
5355
<<: *defaults
54-
steps:
55-
- checkout
56-
- setup_remote_docker
57-
- run: *install_dependency
58-
- run: *install_deploysuite
59-
- restore_cache: *restore_cache_settings_for_build
60-
- run: ./build.sh
61-
- save_cache: *save_cache_settings
62-
- deploy:
63-
name: Running MasterScript.
64-
command: |
65-
#git clone --branch v1.1 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
66-
#cp ./../buildscript/master_deploy.sh .
67-
#./master_deploy.sh -d ECS -e PROD -t latest -s leaderboard-processor -i leaderboard-processor
68-
./awsconfiguration.sh PROD
69-
source awsenvconf
70-
./buildenv.sh -e PROD -b prod-leaderboard-processor-deployvar
71-
source buildenvvar
72-
./master_deploy.sh -d ECS -e PROD -t latest -s prod-global-appvar,prod-leaderboard-processor-appvar -i leaderboard-processor
56+
environment:
57+
DEPLOY_ENV: "PROD"
58+
LOGICAL_ENV: "prod"
59+
APPNAME: "leaderboard-processor"
60+
steps: *builddeploy_steps
7361

7462
workflows:
7563
version: 2
7664
build:
7765
jobs:
7866
# Development builds are executed on "develop" branch only.
7967
- "build-dev":
80-
context : org-global
68+
context : org-global
8169
filters:
8270
branches:
8371
only:
8472
- develop
73+
74+
# Production builds are exectuted only on tagged commits to the
75+
# master branch.
8576
- "build-prod":
86-
context : org-global
77+
context : org-global
8778
filters:
8879
branches:
89-
only:
90-
- master
80+
only: master

0 commit comments

Comments
 (0)