4
0
This commit is contained in:
Pünkösd Marcell 2020-04-29 23:30:41 +02:00
commit f018536446

View File

@ -4,7 +4,7 @@ name: default
steps: steps:
- name: static_analysis - name: static_analysis
image: python:3 image: "python:3"
commands: commands:
- pip3 install pylint bandit mccabe - pip3 install pylint bandit mccabe
- pip3 install -r requirements.txt - pip3 install -r requirements.txt
@ -13,31 +13,23 @@ 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: build - name: kaniko
image: docker:stable-dind image: banzaicloud/drone-kaniko
volumes: settings:
- name: dockersock registry: registry.kmlabz.com
path: /var/run repo: birbnetes/${DRONE_REPO_NAME}
environment: username:
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME from_secret: DOCKER_USERNAME
DOCKER_PASSWORD: password:
from_secret: DOCKER_PASSWORD from_secret: DOCKER_PASSWORD
commands: tags:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin registry.kmlabz.com - latest
- docker build -t="registry.kmlabz.com/$DOCKER_USERNAME/$DRONE_REPO_NAME" . - ${DRONE_BUILD_NUMBER}
- docker build -t="registry.kmlabz.com/$DOCKER_USERNAME/$DRONE_REPO_NAME:$DRONE_BUILD_NUMBER" .
- docker push "registry.kmlabz.com/$DOCKER_USERNAME/$DRONE_REPO_NAME"
- docker push "registry.kmlabz.com/$DOCKER_USERNAME/$DRONE_REPO_NAME:$DRONE_BUILD_NUMBER"
services: - name: ms-teams
- name: docker image: kuperiu/drone-teams
image: docker:stable-dind settings:
privileged: true webhook:
volumes: from_secret: TEAMS_WEBHOOK
- name: dockersock when:
path: /var/run status: [ failure ]
volumes:
- name: dockersock
temp: {}