-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
58 lines (51 loc) · 1.25 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
image: node:14-stretch
variables:
FF_USE_FASTZIP: 'true'
cache:
untracked: true
policy: push
key: ${CI_COMMIT_SHORT_SHA}
paths:
- node_modules/
.pull_cached_node_modules:
cache:
untracked: true
key: ${CI_COMMIT_SHORT_SHA}
policy: pull
stages:
- setup
- build
- test
- deploy
install:
stage: setup
script:
- npm install
build:
stage: build
extends: .pull_cached_node_modules
artifacts:
paths:
- dist
expire_in: 1 week
script:
- npm run build
test:
stage: test
extends: .pull_cached_node_modules
before_script:
- apt-get update
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- apt install -y ./google-chrome*.deb;
- export CHROME_BIN=/usr/bin/google-chrome
script:
- npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
deploy_staging:
stage: deploy
script:
- curl --request POST --user user:$DB_CD_UPDATER_PASSWORD https://db-cd-updater.aws-oxygen.s.koppadb.com/deploy-frontend/$CI_PIPELINE_ID
environment:
name: db-staging
url: https://db-staging.koppadb.com
only:
- develop