.gitlab-ci.yml 1.34 KB
Newer Older
Jamesie Pic's avatar
split    
Jamesie Pic committed
1
2
3
.job_template: &job_definition
        variables:
                TOXENV: qa
okhin's avatar
okhin committed
4
5
6
7
        script:
                - tox
        stage: test
        tags: [memopol]
Jamesie Pic's avatar
Jamesie Pic committed
8
9
10
11
12
        before_script:
          - export PIP_CACHE_DIR="pip-cache"
        cache:
                paths:
                        - pip-cache
Jamesie Pic's avatar
split    
Jamesie Pic committed
13
14
15
16
17
18
19
20
21
22

job test qa:
        <<: *job_definition
        variables:
                TOXENV: qa
job test py27:
        <<: *job_definition
        variables:
                TOXENV: py27

Jamesie Pic's avatar
docs    
Jamesie Pic committed
23
24
25
26
27
28
29
30
31
32
33
job deploy docs:
        script:
                - source /srv/memopol/memopol_env/bin/activate
                - pip install -U sphinx
                - cd docs
                - make html
        stage: deploy
        tags: [memopol]
        only:
                - master

okhin's avatar
okhin committed
34
35
36
37
38
39
40
41
42
43
44
45
46
job install:
        script:
                - source /srv/memopol/memopol_env/bin/activate
                - cd /srv/memopol/memopol_env/src/memopol
                - git fetch origin
                - git reset --hard origin/master
                - find . -name '*.pyc' -delete
                - pip install -Ue .
                - src/memopol/bin/install_client_deps.sh
                - memopol migrate --noinput
                - memopol collectstatic --noinput
                - touch /etc/uwsgi/apps-enabled/memopol.ini
        stage: deploy
okhin's avatar
okhin committed
47
        tags: [memopol]
okhin's avatar
okhin committed
48
49
        only:
                - master