-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
37 lines (37 loc) · 1.64 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
machine:
services:
- docker
dependencies:
pre:
- if ! chef -v; then
curl -LO https://omnitruck.chef.io/install.sh && sudo bash ./install.sh -P chefdk;
fi
- chef gem install specific_install
- sudo chef gem specific_install kitchen-docker -l http://github.com/peterabbott/kitchen-docker.git -b v1.6.4
- sudo chef gem uninstall chefspec
- chef gem install chefspec:4.0.1
test:
override:
- chef exec foodcritic cookbooks/circleci -X spec -f any
- chef exec rubocop cookbooks/circleci
- aws configure set default.region us-east-1
# - aws cloudformation validate-template --template-body file://cloudformation/chef_deploy.yml
deployment:
development:
branch: master
commands:
- if [ "$BUILD_TYPE" != "PROD" ]; then
echo "Build type is NON-PROD - Running Pre-Deploy Pipeline - NO Deployment";
berks package circleci.tar.gz -b ./cookbooks/circleci/Berksfile;
aws s3 cp circleci.tar.gz s3://ponzio-0511/circleci.tar.gz;
aws s3 cp bin/node.json s3://ponzio-0511/node.json;
aws s3 cp bin/solo.rb s3://ponzio-0511/solo.rb;
aws s3 cp bin/bootstrap.sh s3://ponzio-0511/bootstrap.sh;
aws s3 cp cloudformation/chef_deploy.yml s3://ponzio-0511/chef_deploy.yml;
fi
- if [ "$BUILD_TYPE" = "PROD" ]; then
echo "Build type is PROD - No Pre-Deploy Tasks - ONLY Deployment";
aws cloudformation create-stack --stack-name circleci-ponzio-test-`date -u +%m-%d-%H%M-UTC` --template-url https://s3.amazonaws.com/ponzio-test/chef_deploy.yml;
else
echo "Build type is NON-PROD - NO Deployment";
fi