-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
executable file
·44 lines (39 loc) · 1.14 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
36
37
38
39
40
41
42
43
44
version: 0.2
phases:
install:
commands:
# update npm
- npm install npm@latest -g
# npm configuration
# here i configure npm to set the cache at /root/.npm
- npm config -g set prefer-offline true
- npm config -g set cache /root/.npm
- npm config get cache
- cd ${CODEBUILD_SRC_DIR}
- npm install --no-package-lock
pre_build:
commands:
# Clean entire monorepo and install dependent packages
- ./node_modules/.bin/lerna bootstrap --hoist --concurrency 4
build:
commands:
# Build everything
- ./node_modules/.bin/lerna run tsc --concurrency 4
post_build:
commands:
# execute all the tests
- npm run test:ci
# create .npmrc files
- npm run write:npmrc
# create lambda packages
- npm run pack:lambdas
# publish to npm
- ./node_modules/.bin/lerna publish from-package --yes --git-head ${CODEBUILD_RESOLVED_SOURCE_VERSION} --concurrency 4
artifacts:
files:
- '**/*'
# At this step, we instruct codebuild to cache all items that in the NPM Cache
# that we configured earlier
cache:
paths:
- /root/.npm/**/*