8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 07:23:46 +00:00
re2o/.gitlab-ci.yml

40 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2017-11-11 21:34:11 +00:00
---
2020-06-01 20:23:01 +00:00
image: debian:buster
2017-11-11 21:34:11 +00:00
stages:
- lint
2020-06-01 21:44:00 +00:00
- deploy_doc
2017-11-11 21:34:11 +00:00
lint:
stage: lint
variables:
LANG: 'en_US.UTF-8'
LC_ALL: 'en_US.UTF-8'
LANGUAGE: 'en_US.UTF-8'
script:
- apt-get -qq update
2017-12-17 15:31:21 +00:00
- DEBIAN_FRONTEND=noninteractive apt-get -qq install -y locales python3-django python3-pylint-django
2017-11-11 21:34:11 +00:00
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
- pylint3 --load-plugins pylint_django cotisations machines re2o logs topologie preferences search users || if [ $? -ne 1 ]; then exit 0; else exit 1; fi
2017-11-11 21:34:11 +00:00
2020-06-01 20:23:01 +00:00
pages:
stage: deploy_doc
script:
- apt-get -qq update
- cat apt_requirements.txt | grep python3 | xargs apt-get -qq install -y
- python3 -m pip install -U -r pip_requirements.txt
2020-06-01 21:08:33 +00:00
- python3 -m pip install -U sphinx recommonmark
2020-06-01 20:41:23 +00:00
- cp re2o/settings_local.example.py re2o/settings_local.py
2020-06-01 20:49:50 +00:00
- sed -i 's/MY_EMAIL_PORT/25/g' re2o/settings_local.py
2020-06-01 21:00:18 +00:00
- apt-get -y install python3-mysqldb default-mysql-client
- sed -i 's/db_engine/django.db.backends.mysql/g' re2o/settings_local.py
2020-06-01 20:23:01 +00:00
- sphinx-apidoc -o re2o/docs_utils/source/autodoc/ -f . ./*/migrations/*
- sphinx-build -b html docs_utils/source/ public
artifacts:
paths:
- public
2020-06-01 21:44:00 +00:00
only:
- dev
2017-11-11 21:34:11 +00:00