-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
108 lines (101 loc) · 2.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
107
108
image: node:12.22.1
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- mkdir .cache_yarn && cd ./.cache_yarn
stages:
- install
- build
- deploy
install_stage:
stage: install
script:
- yarn install --cache-folder .cache_yarn
artifacts:
paths:
- node_modules/
only:
- dev
- staging
- master
build_stage_dev:
stage: build
variables:
REACT_APP_BASE_URL: "$API_BASE_URL_DEV"
REACT_APP_CULQI_PK_KEY: "$CULQI_PK_KEY_DEV"
REACT_APP_CONFERENCE_URL: "$CONFERENCE_BASE_URL_DEV"
REACT_APP_GOOGLE_MAPS_KEY: "$GOOGLE_MAPS_KEY_DEV"
REACT_APP_UGO_API_URL: "$UGO_API_URL_DEV"
REACT_APP_KUSHKI_MERCHANT_ID: "$KUSHKI_MERCHANT_ID_DEV"
REACT_APP_KUSHKI_IN_TEST_ENV: "$KUSHKI_IN_TEST_ENV_DEV"
REACT_APP_KUSHKI_LINK_DOWNLOAD_PDF: "$KUSHKI_LINK_DOWNLOAD_PDF_DEV"
script:
- yarn build
dependencies:
- install_stage
artifacts:
paths:
- build/
only:
- dev
deploy_stage_dev:
stage: deploy
only:
- dev
script:
- yarn global add [email protected] --cache-folder ./.cache_yarn
- firebase deploy -m "Pipeline $CI_PIPELINE_ID, build $CI_BUILD_ID" --non-interactive --token $FIREBASE_DEPLOY_KEY_DEV -P default
build_stage_staging:
stage: build
variables:
REACT_APP_BASE_URL: "$API_BASE_URL_STAGE"
REACT_APP_CULQI_PK_KEY: "$CULQI_PK_KEY_DEV"
REACT_APP_CONFERENCE_URL: "$CONFERENCE_BASE_URL_DEV"
REACT_APP_GOOGLE_MAPS_KEY: "$GOOGLE_MAPS_KEY_DEV"
REACT_APP_UGO_API_URL: "$UGO_API_URL_STAGE"
REACT_APP_KUSHKI_MERCHANT_ID: "$KUSHKI_MERCHANT_ID_DEV"
REACT_APP_KUSHKI_IN_TEST_ENV: "$KUSHKI_IN_TEST_ENV_DEV"
REACT_APP_KUSHKI_LINK_DOWNLOAD_PDF: "$KUSHKI_LINK_DOWNLOAD_PDF_DEV"
script:
- yarn build
dependencies:
- install_stage
artifacts:
paths:
- build/
only:
- staging
deploy_stage_staging:
stage: deploy
only:
- staging
script:
- yarn global add firebase-tools --cache-folder ./.cache_yarn
- firebase deploy -m "Pipeline $CI_PIPELINE_ID, build $CI_BUILD_ID" --non-interactive --token $FIREBASE_DEPLOY_KEY_DEV -P pacientes-stage
build_stage_prod:
stage: build
variables:
REACT_APP_BASE_URL: "$API_BASE_URL_PROD"
REACT_APP_CULQI_PK_KEY: "$CULQI_PK_KEY_PROD"
REACT_APP_CONFERENCE_URL: "$CONFERENCE_BASE_URL_PROD"
REACT_APP_GOOGLE_MAPS_KEY: "$GOOGLE_MAPS_KEY_PROD"
REACT_APP_UGO_API_URL: "$UGO_API_URL_PROD"
REACT_APP_KUSHKI_MERCHANT_ID: "$KUSHKI_MERCHANT_ID_PROD"
REACT_APP_KUSHKI_IN_TEST_ENV: "$KUSHKI_IN_TEST_ENV_PROD"
REACT_APP_KUSHKI_LINK_DOWNLOAD_PDF: "$KUSHKI_LINK_DOWNLOAD_PDF_PROD"
script:
- yarn build
dependencies:
- install_stage
artifacts:
paths:
- build/
only:
- master
deploy_stage_prod:
stage: deploy
only:
- master
script:
- yarn global add firebase-tools --cache-folder ./.cache_yarn
- firebase deploy -m "Pipeline $CI_PIPELINE_ID, build $CI_BUILD_ID" --non-interactive --token $FIREBASE_DEPLOY_KEY_DEV -P prod