2018-12-19 10:19:07 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
2018-12-19 11:24:24 +00:00
|
|
|
- name: test2.7
|
2018-12-19 11:51:03 +00:00
|
|
|
image: python:2.7-stretch
|
2018-12-19 11:24:24 +00:00
|
|
|
pull: always
|
|
|
|
environment:
|
|
|
|
PY_COLORS: "1"
|
|
|
|
commands:
|
|
|
|
- pip install tox -q
|
2019-01-28 21:46:08 +00:00
|
|
|
- tox -e $(tox -l | grep py27 | xargs | sed 's/ /,/g') -q
|
2018-12-19 11:24:24 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- tag
|
|
|
|
|
|
|
|
- name: test3.5
|
2018-12-19 11:51:03 +00:00
|
|
|
image: python:3.5-stretch
|
2018-12-19 11:24:24 +00:00
|
|
|
pull: always
|
|
|
|
environment:
|
|
|
|
PY_COLORS: "1"
|
|
|
|
commands:
|
|
|
|
- pip install tox -q
|
2019-01-28 21:46:08 +00:00
|
|
|
- tox -e $(tox -l | grep py35 | xargs | sed 's/ /,/g') -q
|
2018-12-19 11:24:24 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- tag
|
|
|
|
|
|
|
|
- name: test3.6
|
2018-12-19 11:51:03 +00:00
|
|
|
image: python:3.6-stretch
|
2018-12-19 11:24:24 +00:00
|
|
|
pull: always
|
2018-12-19 10:19:07 +00:00
|
|
|
environment:
|
|
|
|
PY_COLORS: "1"
|
|
|
|
commands:
|
2018-12-19 11:24:24 +00:00
|
|
|
- pip install tox -q
|
2019-01-28 21:46:08 +00:00
|
|
|
- tox -e $(tox -l | grep py36 | xargs | sed 's/ /,/g') -q
|
2018-12-19 11:24:24 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- tag
|
|
|
|
|
|
|
|
- name: test3.7
|
2018-12-19 11:51:03 +00:00
|
|
|
image: python:3.7-stretch
|
2018-12-19 11:24:24 +00:00
|
|
|
pull: always
|
|
|
|
environment:
|
|
|
|
PY_COLORS: "1"
|
|
|
|
commands:
|
|
|
|
- pip install tox -q
|
2019-01-28 21:46:08 +00:00
|
|
|
- tox -e $(tox -l | grep py37 | xargs | sed 's/ /,/g') -q
|
2018-12-19 10:19:07 +00: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
|
2018-12-19 11:24:24 +00:00
|
|
|
depends_on:
|
|
|
|
- test2.7
|
|
|
|
- test3.5
|
|
|
|
- test3.6
|
|
|
|
- test3.7
|
2018-12-19 10:19:07 +00: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 22:42:59 +00:00
|
|
|
depends_on:
|
|
|
|
- build
|
2018-12-19 10:19:07 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- tag
|
|
|
|
|
2019-01-28 22:39:14 +00:00
|
|
|
- name: gpgsign
|
2018-12-19 10:19:07 +00: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 22:42:59 +00:00
|
|
|
depends_on:
|
|
|
|
- checksum
|
2018-12-19 10:19:07 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- tag
|
|
|
|
|
|
|
|
- name: publish
|
|
|
|
image: plugins/github-release
|
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: github_token
|
|
|
|
files:
|
|
|
|
- dist/*
|
|
|
|
- sha256sum.txt
|
2019-01-29 23:43:21 +00:00
|
|
|
title: $${DRONE_TAG}
|
|
|
|
note: CHANGELOG.md
|
2019-01-28 22:42:59 +00:00
|
|
|
depends_on:
|
|
|
|
- gpgsign
|
2018-12-19 10:19:07 +00: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 22:42:59 +00:00
|
|
|
depends_on:
|
|
|
|
- publish
|
2018-12-19 10:19:07 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- tag
|
2019-01-28 22:01:34 +00: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 22:42:59 +00:00
|
|
|
depends_on:
|
|
|
|
- pypi_publish
|
2019-01-28 22:01:34 +00:00
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- success
|
|
|
|
- failure
|