4
0

use volume cache
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Torma Kristóf 2020-05-06 12:52:24 +02:00
parent 0782c5841c
commit 2770e0921d
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
2 changed files with 27 additions and 2 deletions

View File

@ -3,8 +3,18 @@ type: docker
name: default
steps:
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
- /root/.cache/pip
- name: static_analysis
image: "python:3"
image: "python:3.8"
commands:
- pip3 install pylint bandit mccabe
- pip3 install -r requirements.txt
@ -13,6 +23,16 @@ steps:
- find . -name "*.py" -exec python3 -m mccabe --min 3 '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi
- bandit -r . + || if [ $? -eq 1 ]; then echo "you fail"; fi
- name: rebuild-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- /root/.cache/pip
- name: kaniko
image: banzaicloud/drone-kaniko
settings:
@ -33,3 +53,8 @@ steps:
from_secret: TEAMS_WEBHOOK
when:
status: [ failure ]
volumes:
- name: cache
host:
path: /tmp/cache

View File

@ -1,4 +1,4 @@
FROM python:3.8
FROM registry.kmlabz.com/birbnetes/ai-base-image
ADD extractor_service requirements.txt /extractor_service/
WORKDIR /extractor_service/