-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
82 lines (73 loc) · 1.87 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
# define a default docker image for all jobs
# from https://github.com/trek10inc/gitlab-boilerplate-injector/blob/master/.gitlab-ci.yml
image: node:latest
variables:
PROJECT: "kaamelottvoices"
stages:
- install # install all npm dependencies
- test # execute unit tests
- deploy # stage for deploying
npmInstall:
stage: install
script:
- npm install
# artifacts describe the result of the stage
# that can be used in consecutive stages
artifacts:
untracked: true
#linting:
# stage: test
# script:
# # install standardjs for linting
# - npm install -g standard
# - npm run-script lint
deploy:prod-skill:
stage: deploy
dependencies:
- npmInstall
script:
- export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- npm install -g serverless
- ls
# - mv build .build
- sls deploy -v -s prod --region ${REGION:-"eu-west-1"} -f skill
when: manual
only:
- master
deploy:prod-home:
stage: deploy
dependencies:
- npmInstall
script:
- export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- npm install -g serverless
- ls
# - mv build .build
- sls deploy -v -s prod --region ${REGION:-"eu-west-3"} -f home
when: manual
only:
- master
deploy:prod:
stage: deploy
dependencies:
- npmInstall
script:
- export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- npm install -g serverless
- ls
# - mv build .build
- sls deploy -v -s prod --region ${REGION:-"eu-west-3"}
when: manual
only:
- master
unittesting:
stage: test
# use the artifcats of the 'npmInstall' job
dependencies:
- npmInstall
script:
# install dev-dependency mocha
- npm test