2022-05-02 13:53:19 +00:00
|
|
|
# https://docs.drone.io/pipeline/overview/
|
|
|
|
# https://docs.drone.io/pipeline/configuration/
|
|
|
|
|
2022-05-02 00:03:00 +00:00
|
|
|
kind: pipeline
|
2022-05-02 13:53:19 +00:00
|
|
|
type: docker
|
|
|
|
name: build
|
2022-05-02 00:03:00 +00:00
|
|
|
|
|
|
|
steps:
|
2022-05-02 13:53:19 +00:00
|
|
|
- name: build-app
|
2022-05-02 00:03:00 +00:00
|
|
|
image: 'python:3.10-alpine'
|
|
|
|
commands:
|
|
|
|
- python -m venv .venv
|
|
|
|
- source ./.venv/bin/activate
|
|
|
|
- pip install -r requirements.txt
|
2022-05-02 13:53:19 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: code-audit
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: pylama
|
|
|
|
image: 'python:3.10-alpine'
|
|
|
|
commands:
|
|
|
|
- python -m venv .venv
|
|
|
|
- source ./.venv/bin/activate
|
2022-05-30 20:54:26 +00:00
|
|
|
- 'pip install pylama pylama\[all\] > /dev/null'
|
2022-05-02 13:53:19 +00:00
|
|
|
- pylama
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
include:
|
|
|
|
- pull_request
|
|
|
|
branch:
|
|
|
|
exclude: master
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: deploy
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: deploy
|
|
|
|
image: alpine
|
|
|
|
commands:
|
|
|
|
- 'echo "TODO: implement deploy"'
|
|
|
|
when:
|
|
|
|
branch: master
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- build
|
|
|
|
- code-audit
|