-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
74 lines (70 loc) · 1.75 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
variables:
GCD_APPS: /ibira/lnls/labs/tepui/apps/gcd
GIT_SUBMODULE_STRATEGY: recursive
IMAGE_TAG: $CI_REGISTRY_IMAGE:latest
stages:
- build
- deploy
build-container:
image: docker:20.10.16
stage: build
services:
- docker:20.10.16-dind
script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN
- docker build -t $IMAGE_TAG -f container/Dockerfile .
- docker push $IMAGE_TAG
only:
- build.container
tags:
- x86_64
- cuda11
- docker
build-to-production:
image: $IMAGE_TAG
stage: build
script:
# -- frontend
- yarn install
- CI=false yarn build
# -- backend
- export MAKEFLAGS="-j64"
- mkdir -p backend/sscAnnotat3D/static/
- mkdir -p backend/sscAnnotat3D/templates/
- cp -rf build/static/* backend/sscAnnotat3D/static/
- cp -rf build/index.html backend/sscAnnotat3D/templates/
- cd backend
- python3 -m pip install -r requirements.txt
- python3 setup.py build_ext -j64 bdist_wheel
environment:
name: production
only:
- staging
- main
tags:
- x86_64
- cuda11
- docker
artifacts:
paths:
- backend/dist/*whl
- build/
expire_in: 1 day
deploy-to-production:
image: gccdockers/sind
stage: deploy
script:
- singularity build Annotat3DWeb.sif container/Singularity.production.def
- cp Annotat3DWeb.sif ${GCD_APPS}/
environment:
name: production
tags:
- x86_64
- cuda11
- docker
only:
- main
- tags
needs:
- job: build-to-production
artifacts: true