-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
118 lines (111 loc) · 3.91 KB
/
.gitlab-ci.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
image: node:6.10
before_script:
- npm prune
- npm update -q
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- 'node_modules/'
test:
script:
- npm run ci
deploy-dev01:
stage: deploy
environment:
name: dev01
url: https://starter.dev01.neosperiencecloud.com/v1/say/hello
variables:
AWS_ACCESS_KEY_ID: $DEV01_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $DEV01_AWS_SECRET_ACCESS_KEY
SERVERLESS_ACCOUNT_ID: $DEV01_AWS_ACCOUNT_ID
SERVERLESS_STAGE: dev
SERVERLESS_REGION: eu-west-1
SERVERLESS_CUSTOM_DOMAIN_NAME_BASE_DOMAIN_NAME: starter.dev01.neosperiencecloud.com
CONFIG_LOGGER_CONSOLE_OPTIONS_LEVEL: verbose
CONFIG_LOGGER_FILE_OPTIONS_LEVEL: verbose
CONFIG_LOGGER_FILE_OPTIONS_FILENAME: logs/dev.log
script:
- apt-get update -y && apt-get install gettext-base -y
- envsubst < "config/config.json.dist" > "config/config.json"
- npm run sls -- package
- node scripts/adjust-serverless-state.js
- npm run sls -- deploy --package .serverless
- rm config/config.json
only:
# use 'master' instead of 'never' to activate this deploy
- never
deploy-stage01:
stage: deploy
environment:
name: stage01
url: https://starter.stage01.neosperiencecloud.com/v1/say/hello
variables:
AWS_ACCESS_KEY_ID: $STAGE01_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $STAGE01_AWS_SECRET_ACCESS_KEY
SERVERLESS_ACCOUNT_ID: $STAGE01_AWS_ACCOUNT_ID
SERVERLESS_STAGE: test
SERVERLESS_REGION: eu-west-1
SERVERLESS_CUSTOM_DOMAIN_NAME_BASE_DOMAIN_NAME: starter.stage01.neosperiencecloud.com
CONFIG_LOGGER_CONSOLE_OPTIONS_LEVEL: warn
CONFIG_LOGGER_FILE_OPTIONS_LEVEL: warn
CONFIG_LOGGER_FILE_OPTIONS_FILENAME: logs/stage.log
script:
- apt-get update -y && apt-get install gettext-base -y
- envsubst < "config/config.json.dist" > "config/config.json"
- npm run sls -- package
- node scripts/adjust-serverless-state.js
- npm run sls -- deploy --package .serverless
- rm config/config.json
only:
# use 'stage' instead of 'never' to activate this deploy
- never
deploy-nc01:
stage: deploy
environment:
name: nc01
url: https://starter.nc01.neosperiencecloud.com/v1/say/hello
variables:
AWS_ACCESS_KEY_ID: $NC01_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $NC01_AWS_SECRET_ACCESS_KEY
SERVERLESS_ACCOUNT_ID: $NC01_AWS_ACCOUNT_ID
SERVERLESS_STAGE: prod
SERVERLESS_REGION: eu-west-1
SERVERLESS_CUSTOM_DOMAIN_NAME_BASE_DOMAIN_NAME: starter.nc01.neosperiencecloud.com
CONFIG_LOGGER_CONSOLE_OPTIONS_LEVEL: error
CONFIG_LOGGER_FILE_OPTIONS_LEVEL: error
CONFIG_LOGGER_FILE_OPTIONS_FILENAME: logs/prod.log
script:
- apt-get update -y && apt-get install gettext-base -y
- envsubst < "config/config.json.dist" > "config/config.json"
- npm run sls -- package
- node scripts/adjust-serverless-state.js
- npm run sls -- deploy --package .serverless
- rm config/config.json
only:
# use 'production' instead of 'never' to activate this deploy
- never
deploy-nsp:
stage: deploy
environment:
name: nsp
url: https://starter.nsp.neosperiencecloud.com/v1/say/hello
variables:
AWS_ACCESS_KEY_ID: $NSP_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $NSP_AWS_SECRET_ACCESS_KEY
SERVERLESS_ACCOUNT_ID: $NSP_AWS_ACCOUNT_ID
SERVERLESS_STAGE: prod
SERVERLESS_REGION: eu-west-1
SERVERLESS_CUSTOM_DOMAIN_NAME_BASE_DOMAIN_NAME: starter.nsp.neosperiencecloud.com
CONFIG_LOGGER_CONSOLE_OPTIONS_LEVEL: error
CONFIG_LOGGER_FILE_OPTIONS_LEVEL: error
CONFIG_LOGGER_FILE_OPTIONS_FILENAME: logs/prod.log
script:
- apt-get update -y && apt-get install gettext-base -y
- envsubst < "config/config.json.dist" > "config/config.json"
- npm run sls -- package
- node scripts/adjust-serverless-state.js
- npm run sls -- deploy --package .serverless
- rm config/config.json
only:
# use 'production' instead of 'never' to activate this deploy
- never