forked from City-of-Helsinki/harrastuspassi-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
68 lines (59 loc) · 1.38 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
---
image: docker.haltu.net/haltu/env/bergenia:latest
before_script:
- cp local_settings.py.tpl local_settings.py
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- python3 -m venv ../venv
- source ../venv/bin/activate
- pip3 install wheel
services:
- name: mdillon/postgis:10
alias: postgresql
- memcached:1.5.6
- redis:4.0.9
variables:
DJANGO_SETTINGS_MODULE: local_settings
POSTGRES_DB: bergenia
POSTGRES_PASSWORD: bergenia
POSTGRES_USER: bergenia
RABBITMQ_DEFAULT_VHOST: bergenia
stages:
- build
- test
build_devel:
stage: build
script:
- pwd
- cat local_settings.py
- pip3 install -r requirements.txt
- python3 manage.py help
build_prod:
stage: build
script:
- pwd
- cat local_settings.py
- pip3 install -r requirements_prod.txt
- python3 manage.py help
test_local_settings:
image: docker.haltu.net/c-helsinki/harrastuspassi_salt:develop
script:
- cp /home/bew/local_settings.py local_settings.py
- cat local_settings.py
- pip3 install -r requirements_prod.txt
- python3 manage.py help
prospector:
stage: test
script:
- pip3 install -r requirements.txt
- prospector -0 --uses django,celery src
migrate:
stage: test
script:
- pip3 install -r requirements_prod.txt
- python3 manage.py migrate
test:
stage: test
script:
- pip3 install -r requirements.txt
- pytest