Commit 2047431f authored by sebastien letort's avatar sebastien letort

Merge django.

parents 66f4325c ffa355b0
......@@ -11,3 +11,4 @@ __pycache__
.coverage
/controller/htmlcov
/.env
metrics/*.stats
image: docker:latest
variables:
DOCKER_DRIVER: overlay2
stages:
- build
- test
- cleanning
before_script:
- docker info
- docker-compose --version
- pwd
# ---------------------------
bootstrap:
tags:
- allgo
stage: build
script: "./bootstrap"
django_pylint:
stage: test
# only:
# - /django/
script:
- docker info
- apk update
- apk upgrade
- apk add python python-dev py-pip build-base bash openssl python3
- pip install docker-compose
- mkdir -p /data/dev
- rm -Rf /data/dev/*
- /bin/bash bootstrap dev-mysql dev-controller dev-ssh dev-django dev-nginx dev-smtpsink dev-registry
- echo $PYLINTHOME
- docker exec -i dev-django pylint3 --rcfile=.pylintrc allgo
allow_failure: true
#~ django_test:
#~ stage: test
#~ # only:
#~ # - /django/
#~ script:
#~ - docker exec -i dev-django python3 manage.py test
nettoyage:
stage: cleanning
when: always
script:
- sudo rm -rf data/*
#!/bin/bash
CONTAINERS="dev-redis dev-mysql dev-controller dev-ssh dev-django dev-smtpsink dev-registry dev-nginx"
CONTAINERS="dev-redis dev-mysql dev-controller dev-ssh dev-django dev-smtpsink dev-registry dev-nginx dev-toolbox"
die()
......
......@@ -29,4 +29,7 @@ ENV ENV="" \
ALLGO_REDIS_HOST="{ENV}-redis" \
ALLGO_IMPORT_REGISTRY="cargo.irisa.fr:8003/allgo/prod/webapp"
# to prevent __pycache__generation, which is owned by root.
ENV PYTHONDONTWRITEBYTECODE 1
LABEL dk.migrate_always=1
This diff is collapsed.
......@@ -11,6 +11,8 @@ RUN apt-getq update && apt-getq install \
python3-crypto python3-natsort python3-aiohttp python3-aioredis supervisor \
python3-ipy python3-django-taggit python3-iso8601 python3-robot-detection \
python3-sqlparse \
# code quality
python3-pylint-django \
# documentation
python3-sphinx \
make \
......@@ -27,6 +29,7 @@ USER allgo
WORKDIR /opt/allgo
LABEL dk.migrate_always=1
ENV PYTHONUNBUFFERED 1
ENV PYLINTHOME /opt/allgo_metrics
# NOTE: we use SIGINT instead of SIGTERM because the django server does not
# catch SIGTERM (while gunicorn catches both SIGTERM & SIGINT)
......
......@@ -27,6 +27,7 @@ services:
volumes:
- "/data/dev/django:/vol"
- "./django:/opt/allgo"
- "./metrics:/opt/allgo_metrics"
networks: [dev]
tty: true
stdin_open: true
......
This directory will get the metrics from django pylint.
And this file aims to make the directory committed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment