"Migrate drone.yml to 1.x [SKIP CI]."

This commit is contained in:
Sergio Morillo 2021-02-13 21:08:42 +01:00
parent 35e8e7b447
commit ba6cb09a31
1 changed files with 256 additions and 46 deletions

View File

@ -1,51 +1,261 @@
pipeline:
tox:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- /var/lib/cache:/root/.cache
notify:
image: drillster/drone-email
kind: pipeline
name: py36-sqlite
steps:
- name: tox
image: python:3.6
pull: if-not-exists
environment:
CFLAGS: -O0
DB_CACHE: /cache
TOX_TESTENV_PASSENV: CFLAGS DB_CACHE
commands:
- pip install tox
- tox -e "py36-sqlite"
volumes:
- name: cache
path: /root/.cache
- name: notify
image: drillster/drone-email
pull: if-not-exists
settings:
from: drone@datalifeit.es
skip_verify: true
secrets: [ email_host, email_port ]
when:
status: [ changed, failure ]
host:
from_secret: email_host
port:
from_secret: email_port
when:
status:
- changed
- failure
volumes:
- name: cache
host:
path: /var/lib/cache
---
kind: pipeline
name: py37-sqlite
steps:
- name: tox
image: python:3.7
pull: if-not-exists
environment:
CFLAGS: -O0
DB_CACHE: /cache
TOX_TESTENV_PASSENV: CFLAGS DB_CACHE
commands:
- pip install tox
- tox -e "py37-sqlite"
volumes:
- name: cache
path: /root/.cache
- name: notify
image: drillster/drone-email
pull: if-not-exists
settings:
from: drone@datalifeit.es
skip_verify: true
host:
from_secret: email_host
port:
from_secret: email_port
when:
status:
- changed
- failure
volumes:
- name: cache
host:
path: /var/lib/cache
---
kind: pipeline
name: py38-sqlite
steps:
- name: tox
image: python:3.8
pull: if-not-exists
environment:
CFLAGS: -O0
DB_CACHE: /cache
TOX_TESTENV_PASSENV: CFLAGS DB_CACHE
commands:
- pip install tox
- tox -e "py38-sqlite"
volumes:
- name: cache
path: /root/.cache
- name: notify
image: drillster/drone-email
pull: if-not-exists
settings:
from: drone@datalifeit.es
skip_verify: true
host:
from_secret: email_host
port:
from_secret: email_port
when:
status:
- changed
- failure
volumes:
- name: cache
host:
path: /var/lib/cache
---
kind: pipeline
name: py36-postgresql
steps:
- name: tox
image: python:3.6
pull: if-not-exists
environment:
CFLAGS: -O0
DB_CACHE: /cache
TOX_TESTENV_PASSENV: CFLAGS DB_CACHE
POSTGRESQL_URI: postgresql://postgres@postgresql:5432/
commands:
- pip install tox
- tox -e "py36-postgresql"
volumes:
- name: cache
path: /root/.cache
- name: notify
image: drillster/drone-email
pull: if-not-exists
settings:
from: drone@datalifeit.es
skip_verify: true
host:
from_secret: email_host
port:
from_secret: email_port
when:
status:
- changed
- failure
services:
postgresql:
image: postgres:12
pull: if-not-exists
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
when:
matrix:
DATABASE: postgresql
- name: postgresql
image: postgres
pull: if-not-exists
environment:
POSTGRES_HOST_AUTH_METHOD: trust
matrix:
include:
- IMAGE: python:3.6
TOXENV: py36
DATABASE: sqlite
- IMAGE: python:3.6
TOXENV: py36
DATABASE: postgresql
- IMAGE: python:3.7
TOXENV: py37
DATABASE: sqlite
- IMAGE: python:3.7
TOXENV: py37
DATABASE: postgresql
- IMAGE: python:3.8
TOXENV: py38
DATABASE: sqlite
- IMAGE: python:3.8
TOXENV: py38
DATABASE: postgresql
volumes:
- name: cache
host:
path: /var/lib/cache
---
kind: pipeline
name: py37-postgresql
steps:
- name: tox
image: python:3.7
pull: if-not-exists
environment:
CFLAGS: -O0
DB_CACHE: /cache
TOX_TESTENV_PASSENV: CFLAGS DB_CACHE
POSTGRESQL_URI: postgresql://postgres@postgresql:5432/
commands:
- pip install tox
- tox -e "py37-postgresql"
volumes:
- name: cache
path: /root/.cache
- name: notify
image: drillster/drone-email
pull: if-not-exists
settings:
from: drone@datalifeit.es
skip_verify: true
host:
from_secret: email_host
port:
from_secret: email_port
when:
status:
- changed
- failure
services:
- name: postgresql
image: postgres
pull: if-not-exists
environment:
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- name: cache
host:
path: /var/lib/cache
---
kind: pipeline
name: py38-postgresql
steps:
- name: tox
image: python:3.8
pull: if-not-exists
environment:
CFLAGS: -O0
DB_CACHE: /cache
TOX_TESTENV_PASSENV: CFLAGS DB_CACHE
POSTGRESQL_URI: postgresql://postgres@postgresql:5432/
commands:
- pip install tox
- tox -e "py38-postgresql"
volumes:
- name: cache
path: /root/.cache
- name: notify
image: drillster/drone-email
pull: if-not-exists
settings:
from: drone@datalifeit.es
skip_verify: true
host:
from_secret: email_host
port:
from_secret: email_port
when:
status:
- changed
- failure
services:
- name: postgresql
image: postgres
pull: if-not-exists
environment:
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- name: cache
host:
path: /var/lib/cache