-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
61 lines (57 loc) · 1.47 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
stages:
- check
- deploy
check:lint:
image: python:3.8.16
stage: check
script:
- pip3 install -r requirements.txt
- pycodestyle
# - flake8
check:test:
image: python:3.8.16
stage: check
script:
- pip3 install -r requirements.txt
# - python manage.py test
deploy:dev:
only:
- development
image: registry.blitzhub.io/docker
stage: deploy
services:
- name: registry.blitzhub.io/docker:dind
alias: docker
variables:
CONTAINER_HOSTNAME: docker
DOCKER_TLS_CERTDIR: ""
before_script:
- docker info
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build -t gitlab.rrz.uni-hamburg.de:4567/cosy-bio/drugst.one/backend:dev -f ./Dockerfile .
- docker push gitlab.rrz.uni-hamburg.de:4567/cosy-bio/drugst.one/backend:dev
dependencies:
- check:lint
- check:test
deploy:prod:
only:
- production
image: registry.blitzhub.io/docker
stage: deploy
when: manual
services:
- name: registry.blitzhub.io/docker:dind
alias: docker
variables:
CONTAINER_HOSTNAME: docker
DOCKER_TLS_CERTDIR: ""
before_script:
- docker info
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build -t gitlab.rrz.uni-hamburg.de:4567/cosy-bio/drugst.one/backend:prod -f ./Dockerfile .
- docker push gitlab.rrz.uni-hamburg.de:4567/cosy-bio/drugst.one/backend:prod
dependencies:
- check:lint
- check:test