-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
52 lines (46 loc) · 1.22 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
image: node
cache:
key: '$CI_BUILD_REPO'
paths:
- node_modules/
stages:
- setup
- build and deploy
Setup:
stage: setup
image: cortesa/docker-firebase:6.8.0
script:
- firebase --version
- yarn install --pure-lockfile --cache-folder .yarn
Develop:
stage: build and deploy
image: cortesa/docker-firebase:6.8.0
environment: development
except:
- master
- production
script:
- yarn build:development
- firebase use --token $FIREBASE_TOKEN syshub-dev
- firebase deploy -m "Pipe $CI_PIPELINE_ID Build $CI_BUILD_ID" --token $FIREBASE_TOKEN
Staging:
stage: build and deploy
image: cortesa/docker-firebase:6.8.0
environment: development
only:
- master
script:
- yarn build:development
- firebase use --token $FIREBASE_TOKEN syshub-dev
- firebase deploy -m "Pipe $CI_PIPELINE_ID Build $CI_BUILD_ID" --token $FIREBASE_TOKEN
# it should deploys in production
Production:
stage: build and deploy
image: cortesa/docker-firebase:6.8.0
environment: production
only:
- production
script:
- yarn build:production
- firebase use --token $FIREBASE_TOKEN syshub-61377
- firebase deploy -m "Pipe $CI_PIPELINE_ID Build $CI_BUILD_ID" --token $FIREBASE_TOKEN