Skip to content

Commit 74484eb

Browse files
committed
deploy master only
1 parent 56a7c48 commit 74484eb

File tree

2 files changed

+65
-6
lines changed

2 files changed

+65
-6
lines changed

.circleci/config.yml

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
version: 2
22
jobs:
33
build:
4-
branches:
5-
only:
6-
- master
74
docker:
85
- image: circleci/node:8.10
96
working_directory: ~/repo
107
steps:
118
- checkout
12-
9+
# Download and cache dependencies
1310
- run:
1411
name: Install Serverless CLI and dependencies
1512
command: |
@@ -19,10 +16,71 @@ jobs:
1916
sudo python get-pip.py
2017
sudo pip install -r requirements.txt -t .
2118
19+
deploy-staging:
20+
docker:
21+
- image: circleci/node:8.10
22+
working_directory: ~/repo
23+
steps:
24+
- checkout
25+
# Download and cache dependencies
26+
- run:
27+
name: Install Serverless CLI and dependencies
28+
command: |
29+
sudo npm i -g serverless
30+
sudo apt-get install python-dev -qy
31+
sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
32+
sudo python get-pip.py
33+
sudo pip install -r requirements.txt -t .
2234
- run:
2335
name: Deploy application to staging
2436
command: sls deploy --stage staging --token ${STAGING_DEMO_ROOKOUT_TOKEN} --agenthost staging.cloud.agent.rookout.com
2537

38+
deploy-production:
39+
docker:
40+
- image: circleci/node:8.10
41+
working_directory: ~/repo
42+
steps:
43+
- checkout
44+
# Download and cache dependencies
45+
- run:
46+
name: Install Serverless CLI and dependencies
47+
command: |
48+
sudo npm i -g serverless
49+
sudo apt-get install python-dev -qy
50+
sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
51+
sudo python get-pip.py
52+
sudo pip install -r requirements.txt -t .
53+
2654
- run:
2755
name: Deploy application to production
28-
command: sls deploy --stage production --token ${DEMO_ROOKOUT_TOKEN} --agenthost cloud.agent.rookout.com
56+
command: sls deploy --stage production --token ${DEMO_ROOKOUT_TOKEN} --agenthost cloud.agent.rookout.com
57+
58+
59+
60+
workflows:
61+
version: 2
62+
build-and-deploy:
63+
jobs:
64+
- build
65+
- deploy-staging:
66+
requires:
67+
- build
68+
filters:
69+
branches:
70+
only: master
71+
- hold-for-approval:
72+
type: approval
73+
requires:
74+
- build
75+
- deploy-staging
76+
filters:
77+
branches:
78+
only: master
79+
- deploy-production:
80+
requires:
81+
- build
82+
- deploy-staging
83+
- hold-for-approval
84+
filters:
85+
branches:
86+
only: master

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.serverless
2-
*.pyc
2+
*.pyc
3+
.history

0 commit comments

Comments
 (0)