ansible-later/.drone.yml

154 lines
3.0 KiB
YAML
Raw Normal View History

2018-12-19 11:19:07 +01:00
---
kind: pipeline
name: default
steps:
- name: test2.7
image: python:2.7-stretch
pull: always
environment:
PY_COLORS: "1"
commands:
- pip install tox -q
2019-01-28 22:46:08 +01:00
- tox -e $(tox -l | grep py27 | xargs | sed 's/ /,/g') -q
when:
event:
- push
- tag
- name: test3.5
image: python:3.5-stretch
pull: always
environment:
PY_COLORS: "1"
commands:
- pip install tox -q
2019-01-28 22:46:08 +01:00
- tox -e $(tox -l | grep py35 | xargs | sed 's/ /,/g') -q
when:
event:
- push
- tag
- name: test3.6
image: python:3.6-stretch
pull: always
2018-12-19 11:19:07 +01:00
environment:
PY_COLORS: "1"
commands:
- pip install tox -q
2019-01-28 22:46:08 +01:00
- tox -e $(tox -l | grep py36 | xargs | sed 's/ /,/g') -q
when:
event:
- push
- tag
- name: test3.7
image: python:3.7-stretch
pull: always
environment:
PY_COLORS: "1"
commands:
- pip install tox -q
2019-01-28 22:46:08 +01:00
- tox -e $(tox -l | grep py37 | xargs | sed 's/ /,/g') -q
2018-12-19 11:19:07 +01:00
when:
event:
- push
- tag
- name: build
image: python:3.7-alpine
pull: true
commands:
- python setup.py sdist bdist_wheel
when:
event:
- push
- tag
depends_on:
- test2.7
- test3.5
- test3.6
- test3.7
2018-12-19 11:19:07 +01:00
- name: checksum
image: alpine
pull: always
commands:
- apk add --no-cache coreutils
# exclude files
# - sha256sum -b files/!(*.out) > CHECKSUMFILE
- sha256sum -b dist/* > sha256sum.txt
2019-01-28 23:42:59 +01:00
depends_on:
- build
2018-12-19 11:19:07 +01:00
when:
event:
- push
- tag
2019-01-28 23:39:14 +01:00
- name: gpgsign
2018-12-19 11:19:07 +01:00
image: plugins/gpgsign:1
pull: always
settings:
key:
from_secret: gpgsign_key
passphrase:
from_secret: gpgsign_passphrase
detach_sign: true
files:
- dist/*
2019-01-28 23:42:59 +01:00
depends_on:
- checksum
2018-12-19 11:19:07 +01:00
when:
event:
- push
- tag
- name: publish
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- dist/*
- sha256sum.txt
2019-01-30 00:43:21 +01:00
title: $${DRONE_TAG}
note: CHANGELOG.md
2019-01-28 23:42:59 +01:00
depends_on:
- gpgsign
2018-12-19 11:19:07 +01:00
when:
event:
- tag
- name: pypi_publish
image: xoxys/drone-pypi:0.1.0
pull: always
settings:
username:
from_secret: pypi_username
password:
from_secret: pypi_password
repository: https://upload.pypi.org/legacy/
skip_build: true
2019-01-28 23:42:59 +01:00
depends_on:
- publish
2018-12-19 11:19:07 +01:00
when:
event:
- tag
2019-01-28 23:01:34 +01:00
- name: notify
image: plugins/matrix
settings:
homeserver: https://matrix.rknet.org
roomid: MtidqQXWWAtQcByBhH:rknet.org
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
username:
from_secret: matrix_username
password:
from_secret: matrix_password
2019-01-28 23:42:59 +01:00
depends_on:
- pypi_publish
2019-01-28 23:01:34 +01:00
when:
status:
- success
- failure