Skip to content

Commit

Permalink
Merge branch 'cache-permissions'
Browse files Browse the repository at this point in the history
  • Loading branch information
aldesantis committed Apr 27, 2019
2 parents 78342e6 + 388f2fd commit 1c38b8c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/executors/default.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
docker:
- image: cgswong/aws
- image: circleci/python
9 changes: 6 additions & 3 deletions src/jobs/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ parameters:

steps:
- checkout
- run:
name: Install awscli
command: pip install awscli --user
- deploy:
name: Deploy to Production
command: |
aws opsworks update-app --app-id <<parameters.app_id>> --app-source Revision=$CIRCLE_SHA1
aws opsworks wait deployment-successful --deployment-ids `aws opsworks create-deployment --stack-id <<parameters.stack_id>> --app-id <<parameters.app_id>> --command "{\"Name\":\"deploy\"}" | awk '{print $2}' | sed 's/"//g'`
~/.local/bin/aws opsworks update-app --app-id <<parameters.app_id>> --app-source Revision=$CIRCLE_SHA1
~/.local/bin/aws opsworks wait deployment-successful --deployment-ids `~/.local/bin/aws opsworks create-deployment --stack-id <<parameters.stack_id>> --app-id <<parameters.app_id>> --command "{\"Name\":\"deploy\"}" | awk '{print $2}' | sed 's/"//g'`
- run:
name: Remember Last Deploy Ref
command: echo $CIRCLE_SHA1 > .last_deploy
- save_cache:
key: last-head-{{ epoch }}
key: last-head-v2-{{ epoch }}
paths: .last_deploy
- run:
name: Notify Successful Production Deploy
Expand Down
9 changes: 6 additions & 3 deletions src/jobs/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ parameters:
steps:
- checkout
- restore_cache:
key: last-head
key: last-head-v2
- run:
name: Install awscli
command: pip install awscli --user
- deploy:
name: Deploy Staging
command: |
aws opsworks update-app --app-id <<parameters.app_id>> --app-source Revision=$CIRCLE_SHA1
aws opsworks wait deployment-successful --deployment-ids `aws opsworks create-deployment --stack-id <<parameters.stack_id>> --app-id <<parameters.app_id>> --command "{\"Name\":\"deploy\"}" | awk '{print $2}' | sed 's/"//g'`
~/.local/bin/aws opsworks update-app --app-id <<parameters.app_id>> --app-source Revision=$CIRCLE_SHA1
~/.local/bin/aws opsworks wait deployment-successful --deployment-ids `~/.local/bin/aws opsworks create-deployment --stack-id <<parameters.stack_id>> --app-id <<parameters.app_id>> --command "{\"Name\":\"deploy\"}" | awk '{print $2}' | sed 's/"//g'`
- run:
name: Notify Staging Deploy
command: |
Expand Down

0 comments on commit 1c38b8c

Please sign in to comment.