pflaenz.li/.drone.yml
Jannis Portmann 86060740d8
All checks were successful
continuous-integration/drone/push Build is passing
Specify module to test
2024-02-11 19:27:44 +01:00

57 lines
1.2 KiB
YAML

kind: pipeline
type: docker
name: build-latest
steps:
- name: test
image: python:3.12-slim-bookworm
settings:
repo: git.thisfro.ch/pflaenz.li/pflaenzli
environment:
DJANGO_ALLOWED_HOSTS: localhost,[::1]
DJANGO_CSRF_TRUSTED_ORIGINS: http://localhost:8000
commands:
- pip install coverage
- pip install -r requirements.txt
- coverage run --branch --source='.' pflaenzli/manage.py test pflaenzli
- coverage report -m
- name: build-image
image: plugins/docker
settings:
repo: git.thisfro.ch/pflaenz.li/pflaenzli
dockerfile: Dockerfile
tags:
- latest
- ${DRONE_BUILD_NUMBER}
registry: git.thisfro.ch/pflaenz.li/pflaenzli
username:
from_secret: docker_username
password:
from_secret: docker_password
---
kind: pipeline
type: docker
name: build-stable
steps:
- name: build-image
image: plugins/docker
settings:
repo: git.thisfro.ch/pflaenz.li/pflaenzli
dockerfile: Dockerfile
tags:
- stable
registry: git.thisfro.ch/pflaenz.li/pflaenzli
username:
from_secret: docker_username
password:
from_secret: docker_password
trigger:
event:
- promote
target:
- production