-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
58 lines (50 loc) · 978 Bytes
/
.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
image: tedb/lambda-build-box:8
stages:
- build
- deploy
- clean_up
cache:
untracked: true # Cache git-untracked files, like node_modules
before_script:
- ./get-secrets.sh
- NODE_ENV=production npm install --silent
build:
stage: build
script:
- NODE_ENV=development npm install --silent
- npm run build
- rm -rf node_modules
artifacts:
paths:
- release
deploy to production:
stage: deploy
environment:
name: production
only:
- production
script:
- serverless deploy --stage production
deploy to staging:
stage: deploy
environment:
name: staging
only:
- staging
script:
- serverless deploy --stage staging
deploy to development:
stage: deploy
environment:
name: development
only:
- development
script:
- serverless deploy --stage development
clean_up:
stage: clean_up
script:
- rm -rf node_modules
- rm -rf release
- rm -rf ~/.node-gyp
when: on_failure