Skip to content

Commit

Permalink
Migrate to nypr-deploy orb (#225)
Browse files Browse the repository at this point in the history
* chore: Update CircleCI config to use nypr-deploy orb version 0.0.46

* chore: Add debug flag to CircleCI config

* chore: Update nypr-deploy orb version to 0.0.47 in CircleCI config

* chore: Update nypr-deploy orb version to 0.0.48 in CircleCI config

* chore: Update nypr-deploy orb version to 0.0.49 in CircleCI config

* chore: Update nypr-deploy orb version to 0.0.50 in CircleCI config

* chore: Update nypr-deploy orb version to 0.0.51 in CircleCI config

* chore: Update nypr-deploy orb version to 0.0.52 in CircleCI config

* chore: Update nypr-deploy orb version to 0.0.55 in CircleCI config

* chore: Update nypr-deploy orb version to 0.0.63 in CircleCI config

* chore: Update nypr-deploy orb version to 0.0.65 in CircleCI config
  • Loading branch information
skacula authored Aug 27, 2024
1 parent ca377f4 commit 7b6c920
Showing 1 changed file with 19 additions and 46 deletions.
65 changes: 19 additions & 46 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: 2.1

orbs:
nypr-deploy: nypr/[email protected]

filter_all: &filter_all
filters:
branches:
Expand Down Expand Up @@ -29,19 +32,30 @@ workflows:
<<: *filter_all
- test_nginx:
<<: *filter_all
- deploy:
- nypr-deploy/build_and_deploy:
<<: *filter_demo
name: Deploy (demo)
context: "AWS Deploy"
<<: *filter_demo
tag: demo
env: demo
repo: radiolab-vue
service: radiolab-vue
cluster: radiolab-vue
cpu: 512
memory: 1024
debug: true
requires:
- test_js
- test_nginx
- deploy:
- nypr-deploy/build_and_deploy:
<<: *filter_prod
name: Deploy (prod)
context: "AWS Deploy"
env: prod
<<: *filter_prod
repo: radiolab-vue
service: radiolab-vue
cluster: radiolab-vue
cpu: 512
memory: 1024
requires:
- test_js
- test_nginx
Expand Down Expand Up @@ -72,47 +86,6 @@ jobs:
cp ./nginx/*.conf /etc/nginx/
nginx -t
deploy:
docker:
- image: cimg/python:3.7
parameters:
env:
type: enum
default: "demo"
enum: ["demo", "prod"]
tag:
type: string
default: ""
steps:
- checkout
- setup_npmrc
- setup_remote_docker
- run:
name: Deploy
environment:
ENV: <<parameters.env>>
TAG: <<parameters.tag>>
ROLE: radiolab-vue-<<parameters.env>>
command: |
TAG=${TAG:-$CIRCLE_TAG}
python3 -m venv ~/.venv
source ~/.venv/bin/activate
pip3 install -U git+https://github.com/nypublicradio/nyprsetuptools.git
nyprsetuptools DockerDeploy \
--fargate \
--cpu=512 \
--memory-reservation=1024 \
--ecr-repository=radiolab-vue \
--ecs-cluster=radiolab-vue \
--ports=80 \
--execution-role=$ROLE \
--task-role=$ROLE \
--environment=$ENV \
--tag=$TAG \
--wait=300
commands:
setup_npmrc:
steps:
Expand Down

0 comments on commit 7b6c920

Please sign in to comment.