-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
93 lines (82 loc) · 2.11 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
image: node:18-alpine3.17
stages:
# - test
- build
- deploy
- invalidate-cdn
- e2e-cypress-test-dev
- cache-warming
#cache:
# untracked: true
# policy: push
# key: ${CI_COMMIT_SHORT_SHA}
# paths:
# - node_modules/
# - cache/yarn/
# - cache/Cypress/
#.pull_cached_node_modules:
# cache:
# untracked: true
# key: ${CI_COMMIT_SHORT_SHA}
# policy: pull
#test:
# stage: test
# extends: .pull_cached_node_modules
# script:
# - yarn install --immutable
# - yarn lint
# - yarn test --no-watch --no-progress --browsers=ChromeHeadless
#
e2e-cypress-test-chrome-dev:
stage: e2e-cypress-test-dev
# extends: .pull_cached_node_modules
image: cypress/browsers:node-18.14.1-chrome-110.0.5481.96-1-ff-109.0-edge-110.0.1587.41-1
script:
- npm config fix
- yarn install --immutable
- yarn run e2e-dev --browser chrome --headless
only:
- master
cache-warming:
stage: cache-warming
image: cypress/browsers:node-18.14.1-chrome-110.0.5481.96-1-ff-109.0-edge-110.0.1587.41-1
script:
- yarn install --frozen-lockfile
- yarn cy:cache-warming
only:
- schedules
build:
stage: build
script:
- yarn install --immutable
- yarn build:sls
deploy:
stage: deploy
script:
- yarn install --immutable
- yarn build:sls
- yarn deploy
only:
- master
deploy-prod:
stage: deploy
script:
- yarn install --immutable
- yarn build-prod:sls
- yarn deploy-prod
only:
- production
invalidate-cdn:
stage: invalidate-cdn
image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
script:
- aws cloudfront create-invalidation --distribution-id E2THVA6LSXZ35Q --paths "/*"
only:
- master
invalidate-cdn-prod:
stage: invalidate-cdn
image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
script:
- aws cloudfront create-invalidation --distribution-id E3E1M6F81HHESU --paths "/*"
only:
- production