-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
71 lines (57 loc) · 1.77 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: 0.2
phases:
install:
commands:
- echo Initalling source NPM depencies
- yarn
pre_build:
commands:
- npm nx --version
build:
commands:
- echo Projects build started on `date`
- echo Using variables
- echo NODE_ENV = $NODE_ENV
# Run Tests
# - echo Backend build started on `date`
# - npm run test:gt:runs
# Building backend
- echo Backend build started on `date`
- yarn build
- echo Backend build completed on `date`
# Creating deploy folder
- mkdir ida-accounts
# populate dist into deploy folder
- mkdir ida-accounts/dist
- cp -r dist/* ida-accounts/dist/
# Populate scripts into deploy folder
- mkdir ida-accounts/scripts
- cp -r deploy/scripts/* ida-accounts/scripts/
# Populate server files into deploy folder
- mkdir ida-accounts/server-files
- cp -r deploy/files/nginx.config ida-accounts/server-files/default
- perl -pi -e "s/__SERVER_NAME__/$SERVER_NAME/g; s/__SSL_CERTIFICATE__/$SSL_CERTIFICATE/g; s/__SSL_CERTIFICATE_KEY__/$SSL_CERTIFICATE_KEY/g " ida-accounts/server-files/default
# Get config files
- cp package.json ./ida-accounts/package.json
- cp appspec.yml ./ida-accounts/appspec.yml
- echo $NX_API_URL >> test.txt
- echo $NX_SOCKET_API >> test.txt
# Delete node_modules
- rm -rf node_modules
# List backck and frontend folders
- ls ./ida-accounts
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- '**/*'
secondary-artifacts:
athentication:
files:
- '**/*'
base-directory: ida-accounts
blah:
files:
- '**/*'
base-directory: ida-accounts