-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec.yml
More file actions
42 lines (41 loc) · 1.12 KB
/
buildspec.yml
File metadata and controls
42 lines (41 loc) · 1.12 KB
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
version: 0.2
env:
variables:
BUILD_ENV: "prod"
phases:
install:
commands:
- echo Entered the install phase...
- apt-get update -y
- apt-get -y install mongodb-server
- echo Starting mongodb server...
- service mongodb start
- echo Installing Angular CLI...
- npm install -g @angular/cli
- mkdir -p ${CODEBUILD_SRC_DIR}/appRoot
- cd ${CODEBUILD_SRC_DIR}/appRoot
- echo Creating new Angular project demo...
- ng new demo --defaults
- ls $CODEBUILD_SRC_DIR
- cp -r ${CODEBUILD_SRC_DIR}/demo/. $CODEBUILD_SRC_DIR/appRoot/demo
- cd $CODEBUILD_SRC_DIR/appRoot/demo
- echo install ${BUILD_ENV}...
- npm install --${BUILD_ENV}
- echo Running setup...
- npm run setup
finally:
- echo Install phase complete...
build:
commands:
- echo Entered the build phase...
- "ng build"
finally:
- echo Build phase complete
artifacts:
files:
- '**/*'
base-directory: 'dist*'
discard-paths: yes
cache:
paths:
- '/node_modules/**/*'