Turn of cache dir to save memory.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Oliver Marks 2019-05-04 13:12:23 +01:00
parent 127414a0cf
commit 19795af2d3
3 changed files with 37 additions and 18 deletions

View File

@ -3,14 +3,14 @@ name: default
steps:
- name: tests
image: python:3.6
image: python:3.6-alpine
environment:
PYTHONUSERBASE: /drone/src/cache/packages
POSTGRES_USER: mhackspace
USE_DOCKER: yes
DJANGO_SETTINGS_MODULE: config.settings.test
BUCKET_URL: http://minio:9000
commands:
- apk add git build-base gcc python3-dev postgresql-dev musl-dev jpeg-dev zlib-dev openjpeg-dev tiff-dev libffi-dev freetype-dev libev-dev lcms2-dev tk-dev tcl-dev harfbuzz-dev fribidi-dev libxslt-dev
- cp -n env.example .env
- mkdir -p ./cache/packages ./cache/pip
- pip install --user --cache-dir ./cache/pip -r ./requirements/test.txt
@ -19,13 +19,31 @@ steps:
- pytest -v
# - python manage.py test mhackspace --keepdb --verbosity 2
- name: docker-build
image: plugins/docker
secrets:
- source: DOCKER_USER
target: username
- source: DOCKER_PASS
target: password
settings:
repo: mhackspace-python
dockerfile: ./compose/django/Dockerfile
tags:
- latest
- name: publish-stage
pull: True
image: appleboy/drone-ssh
settings:
host: stage.maidstone-hackspace.org.uk
user: root
secrets: [ ssh_key ]
username:
from_secret: ssh_user
key:
from_secret: ssh_key
port: 22
duration: 4m
command_timeout: 480
script:
- cd /var/www/maidstone-hackspace-website
@ -35,6 +53,7 @@ steps:
- docker-compose -fstage.yml run --rm django python manage.py collectstatic
- docker-compose -fstage.yml down --remove-orphans
- docker-compose -fstage.yml up -d
- echo 'Finished deploy'
- name: publish-live
pull: True
@ -61,7 +80,7 @@ services:
- npm --version
- npm install
- name: minio
- name: bucket
image: minio/minio
environment:
MINIO_ACCESS_KEY: AKIAIOSFODNN7EXAMPLE

View File

@ -10,7 +10,7 @@ RUN apk add --no-cache git build-base gcc \
COPY ./requirements /requirements
RUN pip install --cache-dir ./cache/pip -r /requirements/local.txt \
RUN pip install --no-cache-dir -r /requirements/local.txt \
&& addgroup -g 1000 -S django \
&& adduser -u 1000 -S django -G django

View File

@ -10,7 +10,7 @@ RUN apk add --no-cache git build-base gcc \
COPY ./requirements /requirements
RUN pip install --cache-dir ./cache/pip -r /requirements/local.txt \
RUN pip install --no-cache-dir -r /requirements/local.txt \
&& addgroup -g 1000 -S django \
&& adduser -u 1000 -S django -G django