-
Notifications
You must be signed in to change notification settings - Fork 6
/
.buildspec.yml
27 lines (25 loc) · 948 Bytes
/
.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
version: 0.2
env:
variables:
APP_ENV: "test-prl"
parameter-store:
S3_BUILD_ARTIFACTS_BUCKET: "build.artifacts.bucketname"
S3_BUILD_ARTIFACTS_BUCKET_REGION: "build.artifacts.bucket.region"
AWS_ACCESS_KEY_ID: "build.artifacts.s3.access.key"
AWS_SECRET_ACCESS_KEY: "build.artifacts.s3.secret.key"
phases:
build:
commands:
- echo "Enter build stage..."
- npm --version
- cd ucla-prrla; npm install --silent
- if [ "${APP_ENV}" = "test-prl" ]; then node_modules/.bin/ng build --no-progress; fi
- if [ "${APP_ENV}" = "prl" ]; then node_modules/.bin/ng build --env=prod --no-sourcemap --no-progress; fi
- cd dist
post_build:
commands:
- tar -zcf ../${APP_ENV}.tar.gz .
- cd ..
- ls -la *.tar.gz
- aws s3 cp ${APP_ENV}.tar.gz s3://${S3_BUILD_ARTIFACTS_BUCKET}/prl/${APP_ENV}-latest.tar.gz
- aws s3 sync dist/ s3://${APP_ENV}.library.ucla.edu --delete