All checks were successful
continuous-integration/drone/push Build is passing
66 lines
1.4 KiB
YAML
66 lines
1.4 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: Install packages
|
|
image: python
|
|
commands:
|
|
- pip install -r requirements.txt
|
|
volumes:
|
|
- name: pip_cache
|
|
path: /root/.cache/pip
|
|
|
|
- name: Lint - pylint
|
|
image: python
|
|
commands:
|
|
- pip install -r requirements.txt
|
|
- pylint --ignore-paths app/config.py wsgi.py app/*.py
|
|
volumes:
|
|
- name: pip_cache
|
|
path: /root/.cache/pip
|
|
|
|
- name: Lint - flake8
|
|
image: python
|
|
commands:
|
|
- pip install -r requirements.txt
|
|
- flake8 wsgi.py app/*.py
|
|
volumes:
|
|
- name: pip_cache
|
|
path: /root/.cache/pip
|
|
|
|
- name: Security analysis with bandit
|
|
image: python
|
|
commands:
|
|
- pip install -r requirements.txt
|
|
- bandit -r app/
|
|
volumes:
|
|
- name: pip_cache
|
|
path: /root/.cache/pip
|
|
|
|
- name: Publish the image
|
|
image: plugins/docker
|
|
settings:
|
|
repo: registry.alxczl.fr/ldap-interface
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
registry: registry.alxczl.fr
|
|
auto_tag: true
|
|
when:
|
|
branch:
|
|
- master
|
|
exclude:
|
|
- pull_request
|
|
|
|
volumes:
|
|
- name: pip_cache
|
|
host:
|
|
path: /tmp/drone/cache/pip_cache
|