57 lines
No EOL
1.2 KiB
YAML
57 lines
No EOL
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 |