-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
39 lines (38 loc) · 1.04 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
version: 0.2
env:
variables:
NODE_ENV: Development
phases:
install:
runtime-versions:
nodejs: 10
python: 3.7
commands:
- USER_BASE_PATH=$(python -m site --user-base)
- export PATH=$PATH:$USER_BASE_PATH/bin
- pip install --user aws-sam-cli
- cd $CODEBUILD_SRC_DIR/api
- sam build
- cd $CODEBUILD_SRC_DIR/app
- npm install
build:
commands:
- cd $CODEBUILD_SRC_DIR/api
- sam package --s3-bucket $ARTIFACT_BUCKET_NAME --output-template-file template-output.yaml
- cd $CODEBUILD_SRC_DIR/app
- npm run build
artifacts:
secondary-artifacts:
BuildOutput:
files:
- api/template-output.yaml
discard-paths: yes
BundleOutput:
files:
- "**/*"
base-directory: app/build
cache:
paths:
- api/*/node_modules/**/*
- app/node_modules/**/*
- /root/.local/**/*