-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci-build.yml
85 lines (81 loc) · 1.48 KB
/
.gitlab-ci-build.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
.build:
stage: build
artifacts:
expire_in: 1 week
paths:
- dist
- storage
- assets
- templates
- node_modules
- package.json
- .ebextensions
- .platform
- .env
- .env.local
- .npmrc
- Procfile
- tsconfig.json
script:
- npm run build
- npm run build:admin
- npm run build:client
- npm run build:database
build:test:
extends: .build
environment:
name: test
# only:
# refs:
# - merge_requests
# - develop
# - master
# except:
# refs:
# - qa
# - staging
# - prod
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^release\/.*$/
before_script:
- npm ci
- cp env/test/.env.local .env.local
- cp env/test/firebase.json firebase.json
build:staging:
extends: .build
environment:
name: staging
only:
refs:
- staging
- looker-sso
- contact-us
before_script:
- npm ci
- cp $ENV_STAGING .env.local
- cp $FIREBASE_STAGING firebase.json
build:prod:
extends: .build
environment:
name: prod
only:
refs:
- prod
before_script:
- npm ci
- cp $ENV_PROD .env.local
- cp $FIREBASE_PROD firebase.json
build:qa:
extends: .build
environment:
name: qa
only:
refs:
- qa
before_script:
- npm ci
- cp $ENV_QA .env.local
- cp $FIREBASE_QA firebase.json