Commit 610f9c90 authored by BAIRE Anthony's avatar BAIRE Anthony

Merge branch 'ci_pylint' into 'django'

Ci pylint

See merge request !165
parents c909470f 289556cb
Pipeline #74099 failed with stages
in 7 seconds
image: docker:latest
variables:
DOCKER_DRIVER: overlay2
stages: stages:
- build - build
- test
- cleanning
before_script:
- docker info
- docker-compose --version
- pwd
# ---------------------------
bootstrap: bootstrap:
tags:
- allgo
stage: build stage: build
script: "./bootstrap"
django_pylint:
stage: test
# only:
# - /django/
script: script:
- docker info - echo $PYLINTHOME
- apk update - docker exec -i dev-django pylint3 --rcfile=.pylintrc allgo
- apk upgrade allow_failure: true
- apk add python python-dev py-pip build-base bash openssl python3
- pip install docker-compose #~ django_test:
- mkdir -p /data/dev #~ stage: test
- rm -Rf /data/dev/* #~ # only:
- /bin/bash bootstrap dev-mysql dev-controller dev-ssh dev-django dev-nginx dev-smtpsink dev-registry #~ # - /django/
#~ script:
#~ - docker exec -i dev-django python3 manage.py test
nettoyage:
stage: cleanning
when: always
script:
- sudo rm -rf data/*
...@@ -29,4 +29,7 @@ ENV ENV="" \ ...@@ -29,4 +29,7 @@ ENV ENV="" \
ALLGO_REDIS_HOST="{ENV}-redis" \ ALLGO_REDIS_HOST="{ENV}-redis" \
ALLGO_IMPORT_REGISTRY="cargo.irisa.fr:8003/allgo/prod/webapp" 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 LABEL dk.migrate_always=1
This diff is collapsed.
...@@ -10,7 +10,9 @@ RUN apt-getq update && apt-getq install \ ...@@ -10,7 +10,9 @@ RUN apt-getq update && apt-getq install \
python-mysqldb python3-crypto gunicorn3 python3-redis python-mysqldb \ python-mysqldb python3-crypto gunicorn3 python3-redis python-mysqldb \
python3-crypto python3-natsort python3-aiohttp python3-aioredis supervisor \ python3-crypto python3-natsort python3-aiohttp python3-aioredis supervisor \
python3-ipy python3-django-taggit python3-iso8601 python3-robot-detection \ python3-ipy python3-django-taggit python3-iso8601 python3-robot-detection \
python3-sqlparse python3-django-extensions python3-pydotplus python3-sqlparse \
python3-django-extensions python3-pydotplus \
python3-pylint-django
COPY requirements.txt /tmp/ COPY requirements.txt /tmp/
RUN cd /tmp && pip3 install -r requirements.txt && rm requirements.txt RUN cd /tmp && pip3 install -r requirements.txt && rm requirements.txt
...@@ -22,6 +24,7 @@ USER allgo ...@@ -22,6 +24,7 @@ USER allgo
WORKDIR /opt/allgo WORKDIR /opt/allgo
LABEL dk.migrate_always=1 LABEL dk.migrate_always=1
ENV PYTHONUNBUFFERED 1 ENV PYTHONUNBUFFERED 1
ENV PYLINTHOME /opt/allgo_metrics
# NOTE: we use SIGINT instead of SIGTERM because the django server does not # NOTE: we use SIGINT instead of SIGTERM because the django server does not
# catch SIGTERM (while gunicorn catches both SIGTERM & SIGINT) # catch SIGTERM (while gunicorn catches both SIGTERM & SIGINT)
......
...@@ -27,6 +27,7 @@ services: ...@@ -27,6 +27,7 @@ services:
volumes: volumes:
- "/data/dev/django:/vol" - "/data/dev/django:/vol"
- "./django:/opt/allgo" - "./django:/opt/allgo"
- "./metrics:/opt/allgo_metrics"
networks: [dev] networks: [dev]
tty: true tty: true
stdin_open: 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