@@ -168,12 +168,6 @@ commands:
168168 - run :
169169 name : Build Application
170170 command : yarn build:prod
171- - run :
172- name : Mark Sentry release
173- command : |
174- if [ "${CIRCLE_BRANCH}" == "master" ]; then
175- node packages/app/scripts/sentry-create-release.js
176- fi
177171 - save_cache : *save_prod_build_cache
178172 - save_cache : *save_prod_result
179173 - run :
@@ -302,6 +296,34 @@ jobs:
302296 executor : docker_machine
303297 steps :
304298 - docker_cache
299+ deploy-to-production :
300+ executor : node
301+ environment :
302+ ENVIRONMENT : production
303+ steps :
304+ - checkout_with_cache
305+ - restore_cache : *restore_deps_cache
306+ - attach_workspace : *attach_deps_workspace
307+ - run :
308+ name : Mark Sentry release
309+ command : node packages/app/scripts/sentry-create-release.js
310+ - run :
311+ name : Deploy Image
312+ command : node packages/app/scripts/deploy.js
313+ - run :
314+ name : Deploy Sentry release
315+ command : node packages/app/scripts/sentry-deploy-release.js
316+ deploy-to-staging :
317+ executor : node
318+ environment :
319+ ENVIRONMENT : staging
320+ steps :
321+ - checkout_with_cache
322+ - restore_cache : *restore_deps_cache
323+ - attach_workspace : *attach_deps_workspace
324+ - run :
325+ name : Deploy Image
326+ command : node packages/app/scripts/deploy.js
305327
306328# ###############################
307329# Workflows
@@ -334,3 +356,23 @@ workflows:
334356 - typecheck
335357 # - test-integrations
336358 - test-jest
359+ - deploy-production-approval :
360+ type : approval
361+ filters :
362+ branches :
363+ only :
364+ - master
365+ - deploy-to-production :
366+ requires :
367+ - deploy-production-approval
368+ - create-docker-image
369+ filters :
370+ branches :
371+ only :
372+ - master
373+ - deploy-staging-approval :
374+ type : approval
375+ - deploy-to-staging :
376+ requires :
377+ - deploy-staging-approval
378+ - create-docker-image
0 commit comments