Skip to content

Commit 5b674a8

Browse files
Update config.yml
1 parent a5995ff commit 5b674a8

File tree

1 file changed

+40
-36
lines changed

1 file changed

+40
-36
lines changed

.circleci/config.yml

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,70 @@
11
version: 2
2-
3-
jobs:
4-
# Build & Deploy against development backend
5-
"build-dev":
2+
defaults: &defaults
63
docker:
74
- image: docker:18.06.0-ce-git
8-
steps:
9-
# Initialization.
10-
- checkout
11-
- setup_remote_docker
12-
- run:
13-
name: Installation of build dependencies.
5+
install_dependency: &install_dependency
6+
name: Installation of build and deployment dependencies.
147
command: |
8+
apk update
159
apk add --no-cache bash
1610
apk add --no-cache jq py-pip sudo curl
11+
apk upgrade
1712
pip install --upgrade pip
1813
sudo pip install awscli --upgrade
1914
sudo curl -o /usr/local/bin/ecs-cli https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-latest
2015
sudo pip install docker-compose
2116
sudo chmod +x /usr/local/bin/ecs-cli
22-
- run:
23-
name: Installation of build dependencies.
24-
command: ./build.sh DEV
25-
- deploy:
26-
command: |
2717
28-
git clone --branch devsts https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
18+
install_deploysuite: &install_deploysuite
19+
name: Installation of install_deploysuite.
20+
command: |
21+
git clone --branch v1.3 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
2922
cp ./../buildscript/master_deploy.sh .
3023
cp ./../buildscript/buildenv.sh .
3124
cp ./../buildscript/awsconfiguration.sh .
25+
26+
run_build: &run_build
27+
name: Installation of build dependencies.
28+
command: ./build.sh
29+
30+
jobs:
31+
# Build & Deploy against development backend
32+
"build-dev":
33+
<<: *defaults
34+
35+
steps:
36+
# Initialization.
37+
- checkout
38+
- setup_remote_docker
39+
- run: *install_dependency
40+
- run: *install_deploysuite
41+
- run: *run_build
42+
43+
- deploy:
44+
command: |
3245
./awsconfiguration.sh DEV
3346
source awsenvconf
3447
./buildenv.sh -e DEV -b submission-processor-es_deployvar
3548
source buildenvvar
36-
./master_deploy.sh -d ECS -e DEV -t latest -s submission-processor-es_appvar -i submission-processor-es
49+
./master_deploy.sh -d ECS -e DEV -t latest -s dev-global-appvar,submission-processor-es_appvar -i submission-processor-es
3750
3851
3952
"build-prod":
40-
docker:
41-
- image: docker:18.06.0-ce-git
53+
<<: *defaults
4254
steps:
4355
# Initialization.
4456
- checkout
4557
- setup_remote_docker
46-
- run:
47-
name: Installation of build dependencies.
48-
command: |
49-
apk add --no-cache bash
50-
apk add --no-cache jq py-pip sudo curl
51-
pip install --upgrade pip
52-
sudo pip install awscli --upgrade
53-
sudo curl -o /usr/local/bin/ecs-cli https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-latest
54-
sudo pip install docker-compose
55-
sudo chmod +x /usr/local/bin/ecs-cli
56-
- run:
57-
name: Installation of build dependencies.
58-
command: ./build.sh PROD
58+
- run: *install_dependency
59+
- run: *install_deploysuite
60+
- run: *run_build
5961
- deploy:
6062
command: |
61-
git clone --branch v1.1 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
62-
cp ./../buildscript/master_deploy.sh .
63-
./master_deploy.sh -d ECS -e PROD -t $CIRCLE_BUILD_NUM -s submission-processor-es
64-
63+
./awsconfiguration.sh PROD
64+
source awsenvconf
65+
./buildenv.sh -e PROD -b submission-processor-es_deployvar
66+
source buildenvvar
67+
./master_deploy.sh -d ECS -e PROD -t latest -s prod-global-appvar,submission-processor-es_appvar -i submission-processor-es
6568
6669
workflows:
6770
version: 2
@@ -74,6 +77,7 @@ workflows:
7477
branches:
7578
only: develop
7679
- "build-prod":
80+
context : org-global
7781
filters:
7882
branches:
7983
only: master

0 commit comments

Comments
 (0)