2020-03-09 18:49:19 +01:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: static_analysis
|
2020-05-06 15:10:35 +02:00
|
|
|
image: "python:3.8"
|
2020-03-09 18:49:19 +01:00
|
|
|
commands:
|
2020-05-06 15:10:35 +02:00
|
|
|
- pip3 install --cache-dir='./.pipcache' pylint bandit mccabe
|
|
|
|
- pip3 install --cache-dir='./.pipcache' -r requirements.txt
|
2020-03-09 18:49:19 +01:00
|
|
|
- find . -name "*.py" -exec python3 -m py_compile '{}' \;
|
|
|
|
- find . -name "*.py" -exec pylint '{}' + || 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
|
|
|
|
|
2020-07-07 22:41:47 +02:00
|
|
|
- name: code-analysis
|
|
|
|
image: aosapps/drone-sonar-plugin
|
|
|
|
settings:
|
|
|
|
sonar_host:
|
|
|
|
from_secret: SONAR_HOST
|
|
|
|
sonar_token:
|
|
|
|
from_secret: SONAR_CODE
|
|
|
|
|
2020-04-28 19:09:12 +02:00
|
|
|
- name: kaniko
|
|
|
|
image: banzaicloud/drone-kaniko
|
|
|
|
settings:
|
|
|
|
registry: registry.kmlabz.com
|
2020-04-28 19:16:23 +02:00
|
|
|
repo: birbnetes/${DRONE_REPO_NAME}
|
2020-04-28 19:09:12 +02:00
|
|
|
username:
|
|
|
|
from_secret: DOCKER_USERNAME
|
|
|
|
password:
|
|
|
|
from_secret: DOCKER_PASSWORD
|
2020-04-28 19:11:28 +02:00
|
|
|
tags:
|
|
|
|
- latest
|
|
|
|
- ${DRONE_BUILD_NUMBER}
|
2020-03-09 18:49:19 +01:00
|
|
|
|
2020-07-19 13:53:59 +02:00
|
|
|
- name: sentry
|
2020-07-19 13:56:50 +02:00
|
|
|
image: tormachris/drone-sentry
|
2020-07-19 13:53:59 +02:00
|
|
|
settings:
|
|
|
|
sentry_project: ${DRONE_REPO_NAME}
|
|
|
|
sentry_domain: sentry.kmlabz.com
|
|
|
|
sentry_token:
|
|
|
|
from_secret: SENTRY_TOKEN
|
|
|
|
|
2020-04-28 17:49:26 +02:00
|
|
|
- name: ms-teams
|
|
|
|
image: kuperiu/drone-teams
|
|
|
|
settings:
|
2020-04-28 17:37:39 +02:00
|
|
|
webhook:
|
|
|
|
from_secret: TEAMS_WEBHOOK
|
2020-04-28 17:49:26 +02:00
|
|
|
when:
|
|
|
|
status: [ failure ]
|