.gitlab-ci.yml 1.4 KB
Newer Older
Jerome Flesch's avatar
Jerome Flesch committed
1
2
image: debian:stable-slim

3
4
5
6
7
stages:
  - check
  - deploy_dynamic
  - deploy_static

Jerome Flesch's avatar
Jerome Flesch committed
8
check:
9
  stage: check
Jerome Flesch's avatar
Jerome Flesch committed
10
11
12
13
14
15
16
17
  tags:
    - linux
    - volatile
  script:
    - apt-get update
    - apt-get install -y -q make
    - apt-get install -y -q pycodestyle flake8 python3-flake8 tox
    - make check
18

19
20
deploy_dynamic:
  stage: deploy_dynamic
21
  only:
22
    - master@World/OpenPaperwork/openpaper.work
23
24
25
  tags:
    - openpaper.work
  script:
26
27
28
29
    # this gitlab-runner is not running as root
    # - apt-get update
    # - apt-get install -y -q python3 python3-virtualenv
    # - apt-get install -y -q libmariadb-dev
30
    - cd /var/www/openpaper.work && git pull
Jerome Flesch's avatar
Jerome Flesch committed
31
    - cd /var/www/openpaper.work && source venv/bin/activate && make install
32
    - sudo /etc/reload_apache.sh
33
34
35
36
37
38
39
40
41
42
43

deploy_static:
  stage: deploy_static
  only:
    - master@World/OpenPaperwork/openpaper.work
  tags:
    - linux
    - volatile
  script:
    - apt-get update
    - apt-get install -y -q wget rclone
44
    - apt-get install -y -q python3 python3-virtualenv virtualenv python3-dev
45
    - apt-get install -y -q gettext
46
    - apt-get install -y -q libmariadb-dev
47
48
    - apt-get install -y -q npm
    - npm install -g bower
49
    - cp openpaper/template_local_settings.py openpaper/local_settings.py
50
51
52
    - virtualenv -p python3 venv
    - source venv/bin/activate && make install
    - source venv/bin/activate && ./gen_static_pages.sh static_pages
53
    - ./deliver_static.sh static_pages