-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
106 lines (96 loc) · 1.92 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
image: node:12
stages:
- style
- compile
- publish
- unit-test
- mock-api-test
- full-test-suite
# - deploy-lambdas
# Cache modules in between jobs
cache:
paths:
- node_modules
before_script:
- node --version
- npm --version
- npm set strict-ssl false
- npm config set registry https://registry.npmjs.org/
- npm ci
build:
stage: compile
except:
- master
script:
- npm run build
retry: 2
tags:
- openshift
- kubernetes
style:
stage: style
except:
- master
script:
- npm run lint
- npm run prettier:fix
retry: 2
tags:
- openshift
- kubernetes
pages: # the job must be named pages
stage: publish
script:
- npm run publish
artifacts:
paths:
- public # artifact path must be /public for GitLab Pages to pick it up
only:
- master
tags:
- kubernetes
- openshift
unit-test:
stage: unit-test
except:
- master
script:
- npm run test:unit
coverage: /^All files\s+\|\s+\d+\.*\d*\s+\|\s*(\d+\.*\d*)/
retry: 2
tags:
- openshift
- kubernetes
mock-api-test:
stage: mock-api-test
except:
- master
script:
- npm run test:mock
coverage: /^All files\s+\|\s+\d+\.*\d*\s+\|\s*(\d+\.*\d*)/
retry: 2
tags:
- openshift
- kubernetes
full-test-suite:
stage: full-test-suite
only:
- master
script:
- npm run test:full
coverage: /^All files\s+\|\s+\d+\.*\d*\s+\|\s*(\d+\.*\d*)/
retry: 2
tags:
- openshift
- kubernetes
# UNCOMMENT TO DEPLOY TO AWS ENVIRONMENT
# deploy-lambdas-dev:
# stage: deploy-lambdas
# only:
# - develop # can set certain AWS environments to deploy from different repo branches
# script:
# - SLS_DEBUG=* node_modules/serverless/bin/serverless deploy -v
# variables:
# AWS_ENV: dev # can have n different AWS environments to deploy to, as long as each has a {env-name}.yml file in the env directory
# tags:
# - # tags for GitLab runner