This commit is contained in:
parent
0782c5841c
commit
2770e0921d
27
.drone.yml
27
.drone.yml
@ -3,8 +3,18 @@ type: docker
|
|||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: restore-cache
|
||||||
|
image: drillster/drone-volume-cache
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
settings:
|
||||||
|
restore: true
|
||||||
|
mount:
|
||||||
|
- /root/.cache/pip
|
||||||
|
|
||||||
- name: static_analysis
|
- name: static_analysis
|
||||||
image: "python:3"
|
image: "python:3.8"
|
||||||
commands:
|
commands:
|
||||||
- pip3 install pylint bandit mccabe
|
- pip3 install pylint bandit mccabe
|
||||||
- pip3 install -r requirements.txt
|
- 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
|
- 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
|
- 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
|
- name: kaniko
|
||||||
image: banzaicloud/drone-kaniko
|
image: banzaicloud/drone-kaniko
|
||||||
settings:
|
settings:
|
||||||
@ -33,3 +53,8 @@ steps:
|
|||||||
from_secret: TEAMS_WEBHOOK
|
from_secret: TEAMS_WEBHOOK
|
||||||
when:
|
when:
|
||||||
status: [ failure ]
|
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/
|
ADD extractor_service requirements.txt /extractor_service/
|
||||||
WORKDIR /extractor_service/
|
WORKDIR /extractor_service/
|
||||||
|
Reference in New Issue
Block a user