ansible-later/.drone.yml

210 lines
3.6 KiB
YAML
Raw Normal View History

2018-12-19 11:19:07 +01:00
---
kind: pipeline
2019-03-22 10:29:06 +01:00
name: testing
2019-02-25 17:18:10 +01:00
platform:
os: linux
arch: amd64
steps:
2019-03-22 10:29:06 +01:00
- name: python2.7-ansible
2019-02-25 17:18:10 +01:00
pull: always
image: python:2.7
commands:
2019-03-22 10:29:06 +01:00
- pip install tox -qq
- "tox -e $(tox -l | grep py27 | xargs | sed 's/ /,/g') -q"
environment:
PY_COLORS: 1
2019-02-25 17:18:10 +01:00
depends_on:
- clone
2019-03-22 10:29:06 +01:00
- name: python3.5-ansible
pull: always
image: python:3.5
commands:
2019-03-22 10:29:06 +01:00
- pip install tox -qq
- "tox -e $(tox -l | grep py35 | xargs | sed 's/ /,/g') -q"
environment:
PY_COLORS: 1
depends_on:
- clone
2019-03-22 10:29:06 +01:00
- name: python3.6-ansible
pull: always
image: python:3.6
commands:
2019-03-22 10:29:06 +01:00
- pip install tox -qq
- "tox -e $(tox -l | grep py36 | xargs | sed 's/ /,/g') -q"
environment:
PY_COLORS: 1
2019-02-25 17:18:10 +01:00
depends_on:
- clone
2019-03-22 10:29:06 +01:00
- name: python3.7-ansible
pull: always
image: python:3.7
commands:
2019-03-22 10:29:06 +01:00
- pip install tox -qq
- "tox -e $(tox -l | grep py37 | xargs | sed 's/ /,/g') -q"
environment:
PY_COLORS: 1
depends_on:
- clone
2019-03-22 10:29:06 +01:00
- name: python-flake8
pull: always
image: python:3.7
commands:
2019-03-22 10:29:06 +01:00
- pip install -r test-requirements.txt -qq
- pip install -qq .
- flake8 ./ansiblelater
environment:
PY_COLORS: 1
depends_on:
- clone
2019-03-22 10:29:06 +01:00
- name: python-bandit
pull: always
image: python:3.7
commands:
2019-03-22 10:29:06 +01:00
- pip install -r test-requirements.txt -qq
- pip install -qq .
- bandit -r ./ansiblelater -x ./ansiblelater/tests
2019-03-22 10:29:06 +01:00
environment:
PY_COLORS: 1
2019-02-25 17:18:10 +01:00
depends_on:
- clone
2019-03-22 10:29:06 +01:00
- name: codecov
2019-02-25 17:18:10 +01:00
pull: always
image: python:3.7
commands:
2019-03-22 10:29:06 +01:00
- pip install codecov
- "coverage combine .tox/py*/.coverage"
- codecov --required
2019-03-22 10:29:06 +01:00
environment:
CODECOV_TOKEN:
from_secret: codecov_token
PY_COLORS: 1
2019-02-25 17:18:10 +01:00
depends_on:
2019-03-22 10:29:06 +01:00
- python2.7-ansible
- python3.5-ansible
- python3.6-ansible
- python3.7-ansible
trigger:
ref:
- refs/heads/master
- "refs/tags/**"
- "refs/pull/**"
2019-02-25 17:18:10 +01:00
---
kind: pipeline
name: build
platform:
os: linux
arch: amd64
steps:
- name: build
pull: always
image: python:3.7
commands:
- python setup.py sdist bdist_wheel
- name: checksum
pull: always
image: alpine
commands:
- apk add --no-cache coreutils
- "sha256sum -b dist/* > sha256sum.txt"
- name: gpg-sign
pull: always
image: plugins/gpgsign:1
settings:
detach_sign: true
files:
- "dist/*"
key:
from_secret: gpgsign_key
passphrase:
from_secret: gpgsign_passphrase
2019-03-22 10:29:06 +01:00
when:
event:
exclude:
- pull_request
2019-02-25 17:18:10 +01:00
- name: publish-github
pull: always
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- "dist/*"
- sha256sum.txt
2019-03-22 10:29:06 +01:00
note: CHANGELOG.md
overwrite: true
title: "${DRONE_TAG}"
2019-02-25 17:18:10 +01:00
when:
event:
- tag
2019-02-25 18:50:26 +01:00
- name: publish-pypi
pull: always
image: plugins/pypi
settings:
password:
from_secret: pypi_password
repository: https://upload.pypi.org/legacy/
skip_build: true
username:
from_secret: pypi_username
when:
event:
- tag
2019-02-25 17:18:10 +01:00
2019-03-22 10:29:06 +01:00
trigger:
ref:
- refs/heads/master
- "refs/tags/**"
- "refs/pull/**"
2019-02-25 17:18:10 +01:00
depends_on:
2019-03-22 10:29:06 +01:00
- testing
2019-02-25 17:18:10 +01:00
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
2018-12-19 11:19:07 +01:00
steps:
2019-02-25 18:52:19 +01:00
- name: matrix
image: plugins/matrix
2019-02-25 17:18:10 +01:00
settings:
homeserver: https://matrix.rknet.org
password:
from_secret: matrix_password
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
trigger:
2019-03-22 10:29:06 +01:00
ref:
- refs/heads/master
- "refs/tags/**"
2019-02-25 17:18:10 +01:00
status:
- success
- failure
depends_on:
- build
...