-
Notifications
You must be signed in to change notification settings - Fork 2
/
buildspec.yml
35 lines (32 loc) · 1.16 KB
/
buildspec.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
version: 0.2
phases:
install:
commands:
#- npm uninstal aws-sdk
#- npm uninstal aws-sdk-mock
- npm install --save-dev
pre_build:
commands:
#generate config file
- echo {\"audioBucket\"':' \"$AUDIO_FILE_BUCKET\"} > ./config.json
- npm test
#removes “extraneous” packages
- npm prune --production
#Delete unused binary to reduce package size.
- rm -rf node_modules/ffmpeg-static/bin/darwin
- rm -rf node_modules/ffmpeg-static/bin/win32
- rm -rf node_modules/ffprobe-static/bin/darwin
- rm -rf node_modules/ffprobe-static/bin/win32
- rm -rf node_modules/ffmpeg-static/bin/linux/ia32
- rm -rf node_modules/ffmpeg-static/bin/linux/arm
- rm -rf node_modules/ffmpeg-static/bin/linux/arm64
- rm -rf node_modules/ffprobe-static/bin/linux/ia32
- rm -rf node_modules/ffprobe-static/bin/linux/arm
build:
commands:
- aws s3 cp --recursive ./assets s3://$AUDIO_FILE_BUCKET/assets/
- aws cloudformation package --template template.yml --s3-bucket $S3_BUCKET --output-template template-export.yml
artifacts:
type: zip
files:
- template-export.yml