Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 63 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
working_directory: ~/repo
steps:
- checkout

# Download and cache dependencies
- run:
name: Install Serverless CLI and dependencies
command: |
Expand All @@ -16,10 +16,71 @@ jobs:
sudo python get-pip.py
sudo pip install -r requirements.txt -t .

deploy-staging:
docker:
- image: circleci/node:8.10
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- run:
name: Install Serverless CLI and dependencies
command: |
sudo npm i -g serverless
sudo apt-get install python-dev -qy
sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
sudo pip install -r requirements.txt -t .
- run:
name: Deploy application to staging
command: sls deploy --stage staging --token ${STAGING_DEMO_ROOKOUT_TOKEN} --agenthost staging.cloud.agent.rookout.com

deploy-production:
docker:
- image: circleci/node:8.10
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- run:
name: Install Serverless CLI and dependencies
command: |
sudo npm i -g serverless
sudo apt-get install python-dev -qy
sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
sudo pip install -r requirements.txt -t .

- run:
name: Deploy application to production
command: sls deploy --stage production --token ${DEMO_ROOKOUT_TOKEN} --agenthost cloud.agent.rookout.com
command: sls deploy --stage production --token ${DEMO_ROOKOUT_TOKEN} --agenthost cloud.agent.rookout.com



workflows:
version: 2
build-and-deploy:
jobs:
- build
- deploy-staging:
requires:
- build
filters:
branches:
only: master
- hold-for-approval:
type: approval
requires:
- build
- deploy-staging
filters:
branches:
only: master
- deploy-production:
requires:
- build
- deploy-staging
- hold-for-approval
filters:
branches:
only: master
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.serverless
*.pyc
*.pyc
.history