forked from kompetenzinventar/ki-backend
45 lines
882 B
YAML
45 lines
882 B
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: qa_main
|
|
image: python:3.8-alpine
|
|
commands:
|
|
- apk add --no-cache gcc g++ musl-dev python3-dev
|
|
- pip3 install pipenv
|
|
- pipenv install --dev
|
|
- pipenv run flake8
|
|
- pipenv run python -m unittest discover ki
|
|
when:
|
|
branch:
|
|
- main
|
|
|
|
- name: qa_pr
|
|
image: python:3.8-alpine
|
|
commands:
|
|
- apk add --no-cache gcc g++ musl-dev python3-dev
|
|
- pip3 install pipenv
|
|
- pipenv install --dev
|
|
- pipenv run flake8
|
|
- pipenv run python -m unittest discover ki
|
|
when:
|
|
event:
|
|
- pull_request
|
|
|
|
- name: docker-publish
|
|
image: plugins/docker
|
|
settings:
|
|
registry: registry.wtf-eg.net
|
|
repo: registry.wtf-eg.net/ki-backend
|
|
target: ki-backend
|
|
auto_tag: true
|
|
username:
|
|
from_secret: "docker_username"
|
|
password:
|
|
from_secret: "docker_password"
|
|
when:
|
|
branch:
|
|
- main
|