forked from DataBiosphere/data-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.cgl-lower-env.yml
156 lines (142 loc) · 4.82 KB
/
.gitlab-ci.cgl-lower-env.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
stages:
- test
- build
- deploy
cache:
paths:
- node_modules/
# Build Jobs
# Build Job Template
.build_template: &build_template
image: node:14.16.0-buster
stage: build
before_script:
- git clone https://github.com/HumanCellAtlas/humancellatlas.github.io
- git clone https://github.com/HumanCellAtlas/metadata-schema.git _metadata-schema
- npm install [email protected] -g
- npm -v
- npm install [email protected] --global
- npm install
- npm rebuild sharp
artifacts:
paths:
- public
- maintenance
# Test with Trufflehog
test_trufflehog:
stage: test
image: python:3.5
before_script:
- pip install trufflehog
script:
- trufflehog --regex --rules trufflehog-rules.json --branch main --entropy=False --max_depth 30 https://github.com/HumanCellAtlas/data-portal.git
except:
- prod
# Develop Build
build_cgl-dev:
<<: *build_template
environment:
name: cgl-dev
script:
- cd_metadata-schema && git checkout develop
- export GATSBY_EXPLORE_URL=https://dev.singlecell.gi.ucsc.edu/explore/
- export GATSBY_FILE_SUMMARY_API_URL=https://service.dev.singlecell.gi.ucsc.edu/index/summary
- export GATSBY_PORTAL_URL=https://dev.singlecell.gi.ucsc.edu/
- export GATSBY_TERM_FACETS_API_URL=https://service.dev.singlecell.gi.ucsc.edu/index/projects
- export GATSBY_SYSTEM_HEALTH_CHECK_API_URL=https://service.dev.singlecell.gi.ucsc.edu/health/progress
- export GATSBY_GTM_ID=GTM-M2J5NTJ
- export GATSBY_GTM_AUTH=CzDpc0__fhyqfREDehPK8Q
- export GATSBY_ENV_NAME=env-83
- export GATSBY_ENV=STAGING
- export GATSBY_DEFAULT_CATALOG=dcp3
- export GATSBY_ATLAS=hca
- gatsby build
only:
- main
# Develop Build
build_lungmap-dev:
<<: *build_template
environment:
name: lungmap-dev
script:
- cd_metadata-schema && git checkout develop
- export GATSBY_EXPLORE_URL=https://data-browser.dev.lungmap.net/explore/
- export GATSBY_FILE_SUMMARY_API_URL=https://service.dev.singlecell.gi.ucsc.edu/index/summary
- export GATSBY_PORTAL_URL=https://data-browser.dev.lungmap.net/
- export GATSBY_TERM_FACETS_API_URL=https://service.dev.singlecell.gi.ucsc.edu/index/projects
- export GATSBY_SYSTEM_HEALTH_CHECK_API_URL=https://service.dev.singlecell.gi.ucsc.edu/health/progress
- export GATSBY_GTM_ID=GTM-M2J5NTJ
- export GATSBY_GTM_AUTH=XOKAlpBSltsrm1PKGR-fow
- export GATSBY_ENV_NAME=env-149
- export GATSBY_ENV=STAGING
- export GATSBY_DEFAULT_CATALOG=lungmap
- export GATSBY_ATLAS=lungmap
- gatsby build
only:
- lungmap-main
# Develop Build
build_ux-dev:
<<: *build_template
environment:
name: ux-dev
script:
- cd_metadata-schema && git checkout develop
- export GATSBY_EXPLORE_URL=https://ux-dev.singlecell.gi.ucsc.edu/explore/
- export GATSBY_FILE_SUMMARY_API_URL=https://service.dev.singlecell.gi.ucsc.edu/index/summary
- export GATSBY_PORTAL_URL=https://ux-dev.singlecell.gi.ucsc.edu/
- export GATSBY_TERM_FACETS_API_URL=https://service.dev.singlecell.gi.ucsc.edu/index/projects
- export GATSBY_SYSTEM_HEALTH_CHECK_API_URL=https://service.dev.singlecell.gi.ucsc.edu/health/progress
- export GATSBY_GTM_ID=GTM-M2J5NTJ
- export GATSBY_GTM_AUTH=CzDpc0__fhyqfREDehPK8Q
- export GATSBY_ENV_NAME=env-83
- export GATSBY_ENV=STAGING
- export GATSBY_DEFAULT_CATALOG=dcp3
- export GATSBY_ATLAS=hca
- gatsby build
only:
- ux-dev
########################################
# Deploy Jobs
########################################
# Deploy Job Template
.deploy_template: &deploy_template
stage: deploy
image: python:3.5
before_script:
- pip install awscli
# Dev Deploy
deploy_cgl-dev:
<<: *deploy_template
environment:
name: cgl-dev
script:
- export BUCKET=s3://dev.singlecell.gi.ucsc.edu/
- if [ "$MAINTENANCE" = "true" ];then export SRCDIR=maintenance/; else export SRCDIR=public/; fi
- aws s3 sync $SRCDIR $BUCKET --delete
- aws cloudfront create-invalidation --distribution-id E3562WJBOLN8W8 --paths "/*"
only:
- main
# Lungmap Dev Deploy
deploy_lungmap-dev:
<<: *deploy_template
environment:
name: lungmap-dev
script:
- export BUCKET=s3://data-browser.dev.lungmap.net/
- if [ "$MAINTENANCE" = "true" ];then export SRCDIR=maintenance/; else export SRCDIR=public/; fi
- aws s3 sync $SRCDIR $BUCKET --delete
- aws cloudfront create-invalidation --distribution-id E21CJFOUWO9Q7X --paths "/*"
only:
- lungmap-main
# Dev Deploy
deploy_ux-dev:
<<: *deploy_template
environment:
name: ux-dev
script:
- export BUCKET=s3://ux-dev.singlecell.gi.ucsc.edu/
- if [ "$MAINTENANCE" = "true" ];then export SRCDIR=maintenance/; else export SRCDIR=public/; fi
- aws s3 sync $SRCDIR $BUCKET --delete
- aws cloudfront create-invalidation --distribution-id E3FFK49Z7TQ60R --paths "/*"
only:
- ux-dev