forked from 418sec/Django-CRM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
44 lines (42 loc) · 1.34 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
Python 3.5.2:
script:
- export PY_EXE=python3.5.2
- virtualenv -p python3 env
- source env/bin/activate
- pip install --no-cache-dir -r requirements.txt
- python manage.py test --keepdb --parallel --noinput
- coverage run --source=accounts,cases,common,contacts,leads,opportunity,tasks,invoices,events,teams,marketing manage.py test --keepdb --noinput
- coverage report -m
except:
- tags
deploy_mp:
stage: deploy
environment:
name: live
script:
- sudo /bin/rm -rf /home/dj_crm/dj_crm/; cp -r . /home/dj_crm/dj_crm
- source /home/dj_crm/env/bin/activate
- pip install -r /home/dj_crm/dj_crm/requirements.txt
- python /home/dj_crm/dj_crm/manage.py migrate --noinput
- sudo /etc/init.d/uwsgi restart
- sudo /usr/bin/supervisorctl restart all
only:
- master
tags:
- djcrm_micropyramid
deploy_live:
stage: deploy
environment:
name: live
script:
- sudo /bin/rm -rf /home/dj_crm/dj_crm/; cp -r . /home/dj_crm/dj_crm
- source /home/dj_crm/env/bin/activate
- pip install -r /home/dj_crm/dj_crm/requirements.txt
- python /home/dj_crm/dj_crm/manage.py migrate --noinput
- python /home/dj_crm/dj_crm/manage.py rebuild_index --noinput
- sudo /etc/init.d/uwsgi restart
- sudo /usr/bin/supervisorctl restart all
only:
- master
tags:
- github-crm