Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

Commit

Permalink
clean up deploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
svozza committed Sep 9, 2019
1 parent c30c21b commit 14598d1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
"scripts": {
"backend": "npm run backend-package && npm run backend-deploy",
"backend-package": "cd src/backend/transcriber/ && zip -r ../../../backend/transcriber.zip Dockerfile pom.xml src/",
"backend-deploy": "aws s3 cp src/backend/transcriber/backend.zip s3://media-analysis-demo/build/ --acl public-read",
"build": "npm run webui-build && npm run lambda-build && npm run cfn-build && npm run backend-package && npm run webui-package",
"cfn-build": "npm run cfn-dist && cfn-flip -c -n -l src/cfn/template.yaml templates/template.yaml && npm run cfn-lambdas-dist && npm run cfn-copy-lambdas",
"cfn-copy-lambdas": "npm run cfn-copy-lambdas-aws_sdk && npm run cfn-copy-lambdas-fp && npm run cfn-copy-lambdas-orchestrator && npm run cfn-copy-lambdas-setup",
"cfn-copy-lambdas-aws_sdk": "cp -R src/backend/functions/layers/aws_sdk ./backend/functions/layers",
"cfn-copy-lambdas-fp": "cp -R src/backend/functions/layers/fp ./backend/functions/layers",
"cfn-copy-lambdas-orchestrator": "cp -R src/backend/functions/orchestrator/dist ./backend/functions/orchestrator/",
"cfn-copy-lambdas-setup": "cp -R src/backend/functions/setup/dist ./backend/functions/setup/",
"cfn-deploy": "npm run zip && aws s3 cp ./`npm run echo-version --silent`.zip s3://$CFN_BUCKET/$npm_package_name/`npm run echo-version --silent`/$npm_package_name.zip",
"cfn-dist": "if [ ! -d './templates' ]; then mkdir templates; fi",
"cfn-lambdas-dist": "npm run cfn-lambdas-dist-aws_sdk && npm run cfn-lambdas-dist-fp && npm run cfn-lambdas-dist-orchestrator && npm run cfn-lambdas-dist-setup",
"cfn-lambdas-dist-aws_sdk": "if [ ! -d './backend/functions/layers/aws_sdk' ]; then mkdir -p backend/functions/layers/aws_sdk; fi",
Expand All @@ -21,8 +19,8 @@
"cfn-lambdas-dist-setup": "if [ ! -d './backend/functions/setup/' ]; then mkdir -p backend/functions/setup/; fi",
"cfn-test": "cfn-lint templates/template.yaml",
"cfn-test-local": "npm run lambda-build && npm run cfn-build && aws cloudformation package --template-file templates/template.yaml --output-template-file templates/packaged.yaml --s3-bucket $TEST_BUCKET && aws cloudformation deploy --template-file templates/packaged.yaml --stack-name MediaAnalysis --capabilities CAPABILITY_IAM",
"deploy": "npm run webui-deploy && npm run backend-deploy && npm run cfn-deploy",
"echo-version": "v`node -e \"const {readSync} = require('node-yaml'); console.log(readSync('templates/template.yaml').Globals.Function.Environment.Variables.VERSION)\"`",
"deploy": "npm run zip && aws s3 cp ./`npm run echo-version --silent`.zip s3://$CFN_BUCKET/$npm_package_name/`npm run echo-version --silent`/$npm_package_name.zip",
"echo-version": "echo v`node -e \"const {readSync} = require('node-yaml'); console.log(readSync('templates/template.yaml').Globals.Function.Environment.Variables.VERSION)\"`",
"lambda-build": "npm run lambda-build-layers && npm run lambda-build-orchestrator && npm run lambda-build-setup",
"lambda-build-layers": "cd src/backend/functions/layers && npm run build",
"lambda-build-orchestrator": "cd src/backend/functions/orchestrator && npm run build",
Expand All @@ -35,9 +33,7 @@
"tag": "git tag `npm run echo-version --silent`",
"test": "npm run cfn-test && npm run webui-test && npm run orch-test",
"webui-build": "cd src/frontend && npm run build",
"webui-deploy": "cd src/frontend/build && aws s3 cp . s3://media-analysis-demo/static --recursive --acl public-read --exclude settings.js --exclude .DS_Store",
"webui-package": "cd src/frontend/build && zip -r ../../../backend/frontend.zip .",
"webui-deploy-clean": "aws s3 rm s3://media-analysis-demo/static --recursive",
"webui-test": "cd src/frontend && npm t",
"zip": "zip -r `npm run echo-version --silent`.zip -@ < ci/include.lst"
},
Expand Down

0 comments on commit 14598d1

Please sign in to comment.