-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
76 lines (68 loc) · 2.42 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
stages:
- build
- test
build_job_queue_v2:
stage: build
only:
variables:
- $CI_COMMIT_BRANCH == "api-v2"
script:
- bash get_build_info.sh v2
- docker build -f job_manager/Dockerfile.prod -t docker-registry.ebrains.eu/neuromorphic/nmpi_queue_server:v2 .
- echo $DOCKER_REGISTRY_USER
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_SECRET docker-registry.ebrains.eu
- docker push docker-registry.ebrains.eu/neuromorphic/nmpi_queue_server:v2
tags:
- shell-runner
build_quotas_v2:
stage: build
only:
variables:
- $CI_COMMIT_BRANCH == "api-v2"
script:
- bash get_build_info.sh v2
- docker build -f resource_manager/Dockerfile.prod -t docker-registry.ebrains.eu/neuromorphic/nmpi_resource_manager:v2 .
- echo $DOCKER_REGISTRY_USER
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_SECRET docker-registry.ebrains.eu
- docker push docker-registry.ebrains.eu/neuromorphic/nmpi_resource_manager:v2
tags:
- shell-runner
build_job_queue_v3_staging:
stage: build
only:
variables:
- $CI_COMMIT_BRANCH == "staging"
script:
- bash get_build_info.sh staging
- docker build -f api/deployment/Dockerfile.staging -t docker-registry.ebrains.eu/neuromorphic/nmpi_queue_server_v3:staging api
- echo $DOCKER_REGISTRY_USER
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_SECRET docker-registry.ebrains.eu
- docker push docker-registry.ebrains.eu/neuromorphic/nmpi_queue_server_v3:staging
tags:
- shell-runner
test_job_queue_v3_staging:
stage: test
only:
variables:
- $CI_COMMIT_BRANCH == "staging"
script:
- python3 -m pip install -r api/requirements.txt.lock
- python3 -m pip install -r api/requirements_testing.txt
- cd api
- python3 -m pytest -v --cov=simqueue --cov-report=term
tags:
- docker-runner
image: docker-registry.ebrains.eu/neuromorphic/python:3.10-slim
build_job_queue_v3_production:
stage: build
only:
variables:
- $CI_COMMIT_BRANCH == "main"
script:
- bash get_build_info.sh production
- docker build -f api/deployment/Dockerfile.prod -t docker-registry.ebrains.eu/neuromorphic/nmpi_queue_server_v3:prod api
- echo $DOCKER_REGISTRY_USER
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_SECRET docker-registry.ebrains.eu
- docker push docker-registry.ebrains.eu/neuromorphic/nmpi_queue_server_v3:prod
tags:
- shell-runner