Skip to content

Commit 234a808

Browse files
authored
Update config.yml
1 parent a8a64d5 commit 234a808

File tree

1 file changed

+56
-35
lines changed

1 file changed

+56
-35
lines changed

.circleci/config.yml

Lines changed: 56 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,45 @@
11
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+
11+
install_deploysuite: &install_deploysuite
12+
name: Installation of install_deploysuite.
13+
command: |
14+
git clone --branch v1.3 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+
19+
# Instructions of deployment
20+
deploy_steps: &deploy_steps
21+
- checkout
22+
- attach_workspace:
23+
at: ./workspace
24+
- run: *install_awscli
25+
- run: *install_deploysuite
26+
- setup_remote_docker
27+
- run:
28+
name: "configuring aws environment"
29+
command: |
30+
./awsconfiguration.sh $DEPLOY_ENV
31+
- run:
32+
name: "Building image for deploy"
33+
command: |
34+
source awsenvconf
35+
./build.sh $DEPLOY_ENV
36+
- deploy:
37+
name: "Deploying software"
38+
command: |
39+
source awsenvconf
40+
./deploy.sh $DEPLOY_ENV
41+
42+
243
jobs:
344
test:
445
docker:
@@ -30,54 +71,34 @@ jobs:
3071
root: .
3172
paths:
3273
- dist
33-
deployDev:
34-
docker:
35-
- image: docker:17.06.1-ce-git
36-
steps:
37-
- checkout
38-
- setup_remote_docker
39-
- run:
40-
name: Installation of build dependencies.
41-
command: apk add --no-cache bash
42-
- attach_workspace:
43-
at: ./workspace
44-
- run:
45-
name: Installing AWS client
46-
command: |
47-
apk add --no-cache jq py-pip sudo
48-
sudo pip install awscli --upgrade
49-
- run: ./build.sh DEV
50-
- run: ./deploy.sh DEV
74+
75+
5176
deployProd:
52-
docker:
53-
- image: docker:17.06.1-ce-git
54-
steps:
55-
- checkout
56-
- setup_remote_docker
57-
- run:
58-
name: Installation of build dependencies.
59-
command: apk add --no-cache bash
60-
- attach_workspace:
61-
at: ./workspace
62-
- run:
63-
name: Installing AWS client
64-
command: |
65-
apk add --no-cache jq py-pip sudo
66-
sudo pip install awscli --upgrade
67-
- run: ./build.sh PROD
68-
- run: ./deploy.sh PROD
77+
<<: *python_env
78+
environment:
79+
DEPLOY_ENV: "PROD"
80+
steps: *deploy_steps
81+
82+
deployDev:
83+
<<: *python_env
84+
environment:
85+
DEPLOY_ENV: "DEV"
86+
steps: *deploy_steps
87+
6988
workflows:
7089
version: 2
7190
build:
7291
jobs:
7392
- test
7493
- deployDev:
94+
context : org-global
7595
requires:
7696
- test
7797
filters:
7898
branches:
7999
only: ['dev', 'feature/attachmentPermissions']
80100
- deployProd:
101+
context : org-global
81102
requires:
82103
- test
83104
filters:

0 commit comments

Comments
 (0)