This commit is contained in:
parent
0782c5841c
commit
2770e0921d
27
.drone.yml
27
.drone.yml
@ -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
|
||||
|
@ -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/
|
||||
|
Reference in New Issue
Block a user