-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
387 lines (360 loc) · 12.3 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
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
stages:
- version
- buildPublish
# - publishGCR
variables:
PROJECT_NAME: studiapodyplomowe
GIT_SUBMODULE_STRATEGY: recursive
VERSION_FILE: version.sh
GIT_DEPTH: 500
DOCKER_VERSION: 19.03.12
JDK_VERSION: 11.0.11.hs-adpt
SBT_VERSION: 1.3.10
BASE_IMAGE: jupyter/minimal-notebook:612aa5710bf9
IMAGE_NAME: ds-notebook
NAMESPACE_IMAGE_NAME: biodatageeks/${IMAGE_NAME}
SERVICE_ACCOUNT: "ds-lab-sa"
HUB_IMAGE_NAME: ds-hub
HUB_BASE_IMAGE: jupyterhub/k8s-hub:0.9.1
SPARK_IMAGE_NAME: "spark-py"
SPARK_BASE_IMAGE: "biodatageeks/spark-py:v3.0.1"
GSUTIL_VERSION: "4.55"
MLFLOW_VERSION: 1.13.1
MLFLOW_ENABLED: "false"
AUTO_BUCKET_ENABLED: "false"
AIRFLOW_ENABLED: "false"
AIRFLOW_VERSION: 2.0.0
BIG_DATA_GENOMICS_ENABLED: "false"
GLOW_VERSION: "io.projectglow:glow-spark2_2.12:1.1.1"
GLOW_PY_VERSION: 0.6.0
SEQUILA_VERSION: "org.biodatageeks:sequila_2.12:0.7.0"
PYSEQUILA_VERSION: 0.1.8
SEQTENDER_VERSION: "org.biodatageeks:seqtender_2.11:0.3.7"
PYSEQTENDER_VERSION: 0.1.1
LAB_DOMAIN: lab.biodatageeks.org
GCR_SA: container-admin@studiapodyplomowe.iam.gserviceaccount.com
GCR_SA_KEY: "/root/gcr/sa.json"
CLOUD_SDK_VERSION: 321.0.0
KUBECTL_VERSION: 1.20.0
GCS_NIO_VERSION: 0.120.0-alpha
GCS_CONNECTOR_VERSION: hadoop2-1.9.17
VEP_VERSION: "101.0"
SPARK_PVC_NAME: pvc-shared-pipeline
SEQUILA_DEV_ENABLED: "false"
KEDRO_ENABLED: "false"
KEDRO_VERSION: 0.17.3
VS_CODE_ENABLED: "false"
VS_CODE_VERSION: 3.10.2
.defaultImageVars: &defaultImageVars
SPARK_VERSION: "3.0.1"
SPARK_IMAGE: biodatageeks/spark-py:v3.0.1-ds-0.1.6-gc19d60a
PYTHON_MINOR: "3.7"
SCALA_VERSION: 2.12.13
JUPYTER_KERNEL_NAME: datascience
MLFLOW_ENABLED: "true"
AUTO_BUCKET_ENABLED: "true"
AIRFLOW_ENABLED: "true"
BIG_DATA_GENOMICS_ENABLED: "false"
VS_CODE_ENABLED: "true"
KEDRO_ENABLED: "true"
NOTEBOOKS_REPO: https://github.com/biodatageeks/ds-notebooks
### image for sequila devel
.spark30ImageVars: &spark30ImageVars
SPARK_VERSION: "3.0.1"
SPARK_IMAGE: "biodatageeks/spark-py:v3.0.1"
PYTHON_MINOR: "3.7"
SCALA_VERSION: 2.12.13
SEQUILA_VERSION: "org.biodatageeks:sequila_2.12:0.7.0"
PYSEQUILA_VERSION: 0.2.0
JUPYTER_KERNEL_NAME: pysequila
MLFLOW_ENABLED: "false"
AUTO_BUCKET_ENABLED: "false"
AIRFLOW_ENABLED: "false"
BIG_DATA_GENOMICS_ENABLED: "false"
SEQUILA_DEV_ENABLED: "true"
NOTEBOOKS_REPO: https://github.com/biodatageeks/notebooks
### image for PW students
.edugenImageVars: &edugenImageVars
JDK_VERSION: 11.0.9.hs-adpt
SPARK_VERSION: "3.0.1"
SPARK_IMAGE: "biodatageeks/spark-py:v3.0.1-edugen-0.1.10-g88bbf61"
PYTHON_MINOR: "3.7"
SCALA_VERSION: 2.12.13
SEQUILA_VERSION: "org.biodatageeks:sequila_2.12:0.7.0"
PYSEQUILA_VERSION: 0.2.0
SEQTENDER_VERSION: "org.biodatageeks:seqtender_2.12:0.4.0"
PYSEQTENDER_VERSION: 0.1.2
JUPYTER_KERNEL_NAME: edugen
MLFLOW_ENABLED: "false"
AUTO_BUCKET_ENABLED: "false"
AIRFLOW_ENABLED: "true"
BIG_DATA_GENOMICS_ENABLED: "true"
VEP_VERSION: 101
GLOW_VERSION: "io.projectglow:glow-spark3_2.12:1.1.1"
NOTEBOOKS_REPO: https://github.com/IMID/edugen_pub
###deprecated to remove
#.spark24edugenImageVars: &spark24edugenImageVars
# SPARK_VERSION: "2.4.3"
# SPARK_IMAGE: "gcr.io/studiapodyplomowe/biodatageeks/spark-py:v2.4.3-edugen-0.1.7-g5a6ab7a"
# PYTHON_MINOR: "3.6.9"
# SCALA_VERSION: 2.11.12
# JUPYTER_KERNEL_NAME: edugen
# MLFLOW_ENABLED: "true"
# AUTO_BUCKET_ENABLED: "false"
# AIRFLOW_ENABLED: "true"
# BIG_DATA_GENOMICS_ENABLED: "true"
# NOTEBOOKS_REPO: https://github.com/IMID/edugen_pub
# --------------------------------- STAGE: version ---------------------------------------------------------------------
version-branch:
stage: version
image:
name: mdomke/git-semver:v4.0.1
entrypoint: [""]
script:
- cd /builds/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME && git-semver --format x.y.z+m | sed 's/+/-/g' | xargs -I {} echo "export VERSION={}" > $VERSION_FILE
- cat $VERSION_FILE
artifacts:
paths:
- $VERSION_FILE
tags: [ docker ]
except: [ main, tags ]
version-tag:
stage: version
image:
name: mdomke/git-semver:v4.0.1
entrypoint: [""]
script:
- cd /builds/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME && git-semver --no-hash --no-pre | xargs -I {} echo "export VERSION={}" > $VERSION_FILE
- cat $VERSION_FILE
artifacts:
paths:
- $VERSION_FILE
tags: [ docker ]
only:
- tags
except:
- branches
.buildPublish: &buildPublish
image:
name: docker:$DOCKER_VERSION
before_script:
- source $VERSION_FILE
- docker login -u $DOCKER_USER -p $DOCKER_PASSWD docker.io
script:
- cd $IMAGE_NAME/
- docker build
--pull
--build-arg BASE_IMAGE=$BASE_IMAGE
--build-arg JAVA_VERSION=$JDK_VERSION
--build-arg SCALA_VERSION=$SCALA_VERSION
--build-arg SBT_VERSION=$SBT_VERSION
--build-arg SPARK_VERSION=$SPARK_VERSION
--build-arg NOTEBOOKS_REPO=$NOTEBOOKS_REPO
--build-arg JUPYTER_KERNEL_NAME=$JUPYTER_KERNEL_NAME
--build-arg PYTHON_MINOR=$PYTHON_MINOR
--build-arg SERVICE_ACCOUNT=$SERVICE_ACCOUNT
--build-arg SPARK_IMAGE=$SPARK_IMAGE
--build-arg GSUTIL_VERSION=$GSUTIL_VERSION
--build-arg MLFLOW_VERSION=$MLFLOW_VERSION
--build-arg MLFLOW_ENABLED=$MLFLOW_ENABLED
--build-arg AUTO_BUCKET_ENABLED=$AUTO_BUCKET_ENABLED
--build-arg AIRFLOW_VERSION=$AIRFLOW_VERSION
--build-arg AIRFLOW_ENABLED=$AIRFLOW_ENABLED
--build-arg BIG_DATA_GENOMICS_ENABLED=$BIG_DATA_GENOMICS_ENABLED
--build-arg GLOW_PY_VERSION=$GLOW_PY_VERSION
--build-arg GLOW_VERSION=$GLOW_VERSION
--build-arg SEQUILA_VERSION=$SEQUILA_VERSION
--build-arg PYSEQUILA_VERSION=$PYSEQUILA_VERSION
--build-arg SEQTENDER_VERSION=$SEQTENDER_VERSION
--build-arg PYSEQTENDER_VERSION=$PYSEQTENDER_VERSION
--build-arg LAB_DOMAIN=$LAB_DOMAIN
--build-arg KUBECTL_VERSION=$KUBECTL_VERSION
--build-arg GCS_NIO_VERSION=$GCS_NIO_VERSION
--build-arg GCS_CONNECTOR_VERSION=$GCS_CONNECTOR_VERSION
--build-arg VEP_VERSION=$VEP_VERSION
--build-arg SPARK_PVC_NAME=$SPARK_PVC_NAME
--build-arg SEQUILA_DEV_ENABLED=$SEQUILA_DEV_ENABLED
--build-arg KEDRO_ENABLED=$KEDRO_ENABLED
--build-arg KEDRO_VERSION=$KEDRO_VERSION
--build-arg VS_CODE_VERSION=$VS_CODE_VERSION
--build-arg VS_CODE_ENABLED=$VS_CODE_ENABLED
-t $NAMESPACE_IMAGE_NAME:spark-$JUPYTER_KERNEL_NAME-$SPARK_VERSION-$VERSION
.
- docker push $NAMESPACE_IMAGE_NAME:spark-$JUPYTER_KERNEL_NAME-$SPARK_VERSION-$VERSION
tags: [ docker ]
#.publishGCR: &publishGCR
# image:
# name: google/cloud-sdk:$CLOUD_SDK_VERSION
# before_script:
# - source $VERSION_FILE
# - gcloud auth activate-service-account $GCR_SA --key-file=$GCR_SA_KEY
# - gcloud auth configure-docker
# script:
# - cd $IMAGE_NAME/
# - docker tag $NAMESPACE_IMAGE_NAME:spark-$JUPYTER_KERNEL_NAME-$SPARK_VERSION-$VERSION gcr.io/$PROJECT_NAME/$NAMESPACE_IMAGE_NAME:spark-$JUPYTER_KERNEL_NAME-$SPARK_VERSION-$VERSION
# - docker push gcr.io/$PROJECT_NAME/$NAMESPACE_IMAGE_NAME:spark-$JUPYTER_KERNEL_NAME-$SPARK_VERSION-$VERSION
# tags: [ docker ]
buildPublishDefault:
stage: buildPublish
variables:
<<: *defaultImageVars
<<: *buildPublish
except: [ main ]
#publishGCRDefault:
# stage: publishGCR
# variables:
# <<: *defaultImageVars
# <<: *publishGCR
# except: [ main ]
buildPublish30:
stage: buildPublish
variables:
<<: *spark30ImageVars
<<: *buildPublish
except: [ main ]
###Builds failing and for now not supported - https://github.com/biodatageeks/ds-images/issues/24
#buildPublishEdugen:
# stage: buildPublish
# variables:
# <<: *edugenImageVars
# <<: *buildPublish
# except: [ main ]
#buildPublishspark24Edugen:
# stage: buildPublish
# variables:
# <<: *spark24edugenImageVars
# <<: *buildPublish
# except: [ main ]
#publishGCRspark24Edugen:
# stage: publishGCR
# variables:
# <<: *spark24edugenImageVars
# <<: *publishGCR
# except: [ main ]
#### edugen
buildPublishHub:
stage: buildPublish
variables:
NAMESPACE_IMAGE_NAME: biodatageeks/${HUB_IMAGE_NAME}
image:
name: docker:$DOCKER_VERSION
before_script:
- source $VERSION_FILE
- docker login -u $DOCKER_USER -p $DOCKER_PASSWD docker.io
script:
- cd ds-hub
- docker build
--pull
--build-arg BASE_IMAGE=$HUB_BASE_IMAGE
-t $NAMESPACE_IMAGE_NAME:$VERSION
.
- docker push $NAMESPACE_IMAGE_NAME:$VERSION
tags: [ docker ]
except: [ main ]
#buildPublishSparkPy3:
# stage: buildPublish
# variables:
# NAMESPACE_IMAGE_NAME: biodatageeks/${SPARK_IMAGE_NAME}
# JUPYTER_KERNEL_NAME: datascience
# image:
# name: docker:$DOCKER_VERSION
# before_script:
# - source $VERSION_FILE
# - docker login -u $DOCKER_USER -p $DOCKER_PASSWD docker.io
# script:
# - cd spark-executor
# - docker build
# --pull
# --build-arg BASE_IMAGE=$SPARK_BASE_IMAGE
# --build-arg MLFLOW_VERSION=$MLFLOW_VERSION
# --build-arg JUPYTER_KERNEL_NAME=$JUPYTER_KERNEL_NAME
# --build-arg GLOW_PY_VERSION=$GLOW_PY_VERSION
# -t $NAMESPACE_IMAGE_NAME:v${SPARK_VERSION}-${JUPYTER_KERNEL_NAME}-$VERSION
# .
# - docker push $NAMESPACE_IMAGE_NAME:v${SPARK_VERSION}-${JUPYTER_KERNEL_NAME}-$VERSION
# tags: [ docker ]
# except: [ main ]
#
#buildPublishEdugenSparkPy3:
# stage: buildPublish
# variables:
# NAMESPACE_IMAGE_NAME: biodatageeks/${SPARK_IMAGE_NAME}
# JUPYTER_KERNEL_NAME: edugen
# image:
# name: docker:$DOCKER_VERSION
# before_script:
# - source $VERSION_FILE
# - docker login -u $DOCKER_USER -p $DOCKER_PASSWD docker.io
# script:
# - cd spark-executor
# - docker build
# --pull
# --build-arg BASE_IMAGE=$SPARK_BASE_IMAGE
# --build-arg JUPYTER_KERNEL_NAME=$JUPYTER_KERNEL_NAME
# --build-arg GLOW_PY_VERSION=$GLOW_PY_VERSION
# -t $NAMESPACE_IMAGE_NAME:v${SPARK_VERSION}-${JUPYTER_KERNEL_NAME}-$VERSION
# .
# - docker push $NAMESPACE_IMAGE_NAME:v${SPARK_VERSION}-${JUPYTER_KERNEL_NAME}-$VERSION
# tags: [ docker ]
# except: [ main ]
### https://github.com/biodatageeks/ds-images/issues/24
#buildPublishSparkPy24:
# stage: buildPublish
# variables:
# NAMESPACE_IMAGE_NAME: biodatageeks/${SPARK_IMAGE_NAME}
# SPARK_BASE_IMAGE: biodatageeks/spark-py:v2.4.3-3.6.9
# JUPYTER_KERNEL_NAME: edugen
# image:
# name: docker:$DOCKER_VERSION
# before_script:
# - source $VERSION_FILE
# - docker login -u $DOCKER_USER -p $DOCKER_PASSWD docker.io
# script:
# - cd spark-executor
# - docker build
# --pull
# --build-arg BASE_IMAGE=$SPARK_BASE_IMAGE
# --build-arg MLFLOW_VERSION=$MLFLOW_VERSION
# --build-arg JUPYTER_KERNEL_NAME=$JUPYTER_KERNEL_NAME
# --build-arg GLOW_PY_VERSION=$GLOW_PY_VERSION
# --build-arg VEP_VERSION=$VEP_VERSION
# -t ${NAMESPACE_IMAGE_NAME}:v2.4.3-${JUPYTER_KERNEL_NAME}-$VERSION
# .
# - docker push ${NAMESPACE_IMAGE_NAME}:v2.4.3-${JUPYTER_KERNEL_NAME}-$VERSION
# tags: [ docker ]
# except: [ main ]
#publishGCRSparkPy3:
# stage: publishGCR
# variables:
# NAMESPACE_IMAGE_NAME: biodatageeks/${SPARK_IMAGE_NAME}
# JUPYTER_KERNEL_NAME: datascience
# image:
# name: google/cloud-sdk:$CLOUD_SDK_VERSION
# before_script:
# - source $VERSION_FILE
# - gcloud auth activate-service-account $GCR_SA --key-file=$GCR_SA_KEY
# - gcloud auth configure-docker
# script:
# - cd spark-executor
# - docker tag $NAMESPACE_IMAGE_NAME:v3.0.1-${JUPYTER_KERNEL_NAME}-$VERSION gcr.io/$PROJECT_NAME/$NAMESPACE_IMAGE_NAME:v3.0.1-${JUPYTER_KERNEL_NAME}-$VERSION
# - docker push gcr.io/$PROJECT_NAME/$NAMESPACE_IMAGE_NAME:v3.0.1-${JUPYTER_KERNEL_NAME}-$VERSION
# tags: [ docker ]
# except: [ main ]
### https://github.com/biodatageeks/ds-images/issues/24
#publishGCRspark24:
# stage: publishGCR
# variables:
# NAMESPACE_IMAGE_NAME: biodatageeks/${SPARK_IMAGE_NAME}
# JUPYTER_KERNEL_NAME: edugen
# image:
# name: google/cloud-sdk:$CLOUD_SDK_VERSION
# before_script:
# - source $VERSION_FILE
# - gcloud auth activate-service-account $GCR_SA --key-file=$GCR_SA_KEY
# - gcloud auth configure-docker
# script:
# - cd spark-executor
# - docker tag $NAMESPACE_IMAGE_NAME:v2.4.3-${JUPYTER_KERNEL_NAME}-$VERSION gcr.io/$PROJECT_NAME/$NAMESPACE_IMAGE_NAME:v2.4.3-${JUPYTER_KERNEL_NAME}-$VERSION
# - docker push gcr.io/$PROJECT_NAME/$NAMESPACE_IMAGE_NAME:v2.4.3-${JUPYTER_KERNEL_NAME}-$VERSION
# tags: [ docker ]
# except: [ main ]