xoxys.general/.drone.yml

212 lines
4.1 KiB
YAML
Raw Normal View History

2020-08-18 15:10:09 +02:00
---
kind: pipeline
name: lint
platform:
os: linux
arch: amd64
steps:
2021-09-22 09:19:30 +02:00
- name: flake8
image: python:3.9
commands:
- pip install -r dev-requirements.txt -qq
- flake8
environment:
PY_COLORS: 1
2020-08-18 15:10:09 +02:00
trigger:
ref:
2021-09-22 09:19:30 +02:00
- refs/heads/master
- refs/tags/**
- refs/pull/**
2020-08-18 15:10:09 +02:00
---
kind: pipeline
name: test
platform:
os: linux
arch: amd64
steps:
2021-09-22 09:19:30 +02:00
- name: python36-pytest
image: python:3.6
commands:
- pip install -r dev-requirements.txt -qq
- pip install -r test/unit/requirements.txt -qq
- python -m pytest --cov --cov-append --no-cov-on-fail
environment:
PY_COLORS: 1
depends_on:
- clone
- name: python37-pytest
image: python:3.7
commands:
- pip install -r dev-requirements.txt -qq
- pip install -r test/unit/requirements.txt -qq
- python -m pytest --cov --cov-append --no-cov-on-fail
environment:
PY_COLORS: 1
depends_on:
- clone
- name: python38-pytest
image: python:3.8
commands:
- pip install -r dev-requirements.txt -qq
- pip install -r test/unit/requirements.txt -qq
- python -m pytest --cov --cov-append --no-cov-on-fail
environment:
PY_COLORS: 1
depends_on:
- clone
- name: python39-pytest
image: python:3.9
commands:
- pip install -r dev-requirements.txt -qq
- pip install -r test/unit/requirements.txt -qq
- python -m pytest --cov --cov-append --no-cov-on-fail
environment:
PY_COLORS: 1
depends_on:
- clone
2020-08-18 15:10:09 +02:00
trigger:
ref:
2021-09-22 09:19:30 +02:00
- refs/heads/master
- refs/tags/**
- refs/pull/**
2020-08-18 15:10:09 +02:00
depends_on:
2021-09-22 09:19:30 +02:00
- lint
2020-08-18 15:10:09 +02:00
---
kind: pipeline
name: build
platform:
os: linux
arch: amd64
steps:
2021-09-22 09:19:30 +02:00
- name: build
image: python:3.9
commands:
- GALAXY_VERSION=${DRONE_TAG##v}
- "sed -i 's/version: 0.0.0/version: '\"$${GALAXY_VERSION:-0.0.0}\"'/g' galaxy.yml"
- pip install ansible -qq
- ansible-galaxy collection build --output-path dist/
- name: checksum
image: alpine
commands:
- cd dist/ && sha256sum * > ../sha256sum.txt
- name: changelog-generate
image: thegeeklab/git-chglog
commands:
- git fetch -tq
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
- name: changelog-format
image: thegeeklab/alpine-tools
commands:
- prettier CHANGELOG.md
- prettier -w CHANGELOG.md
- name: publish-gitea
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_token
base_url: https://gitea.rknet.org
files:
- dist/*
- sha256sum.txt
note: CHANGELOG.md
overwrite: true
title: ${DRONE_TAG}
when:
ref:
- refs/tags/**
2020-08-18 15:10:09 +02:00
trigger:
ref:
2021-09-22 09:19:30 +02:00
- refs/heads/master
- refs/tags/**
- refs/pull/**
2020-08-18 15:10:09 +02:00
depends_on:
2021-09-22 09:19:30 +02:00
- test
2020-08-18 15:10:09 +02:00
2020-08-22 20:07:48 +02:00
---
kind: pipeline
name: documentation
platform:
os: linux
arch: amd64
steps:
2021-09-22 09:19:30 +02:00
- name: publish
image: plugins/gh-pages
settings:
netrc_machine: gitea.rknet.org
pages_directory: docs/
password:
from_secret: gitea_token
remote_url: https://gitea.rknet.org/ansible/${DRONE_REPO_NAME}
target_branch: docs
username:
from_secret: gitea_username
2020-08-22 20:07:48 +02:00
trigger:
ref:
2021-09-22 09:19:30 +02:00
- refs/heads/master
- refs/tags/**
2020-08-22 20:07:48 +02:00
depends_on:
2021-09-22 09:19:30 +02:00
- build
2020-08-22 20:07:48 +02:00
2020-08-18 15:10:09 +02:00
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
steps:
2021-09-22 09:19:30 +02:00
- name: matrix
image: thegeeklab/drone-matrix
settings:
homeserver:
from_secret: matrix_homeserver
password:
from_secret: matrix_password
roomid:
from_secret: matrix_roomid
template: "Status: **{{ build.Status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.Link }}){{#if build.Branch}} ({{ build.Branch }}){{/if}} by {{ commit.Author }}<br/> Message: {{ commit.Message.Title }}"
username:
from_secret: matrix_username
2020-08-18 15:10:09 +02:00
trigger:
ref:
2021-09-22 09:19:30 +02:00
- refs/heads/master
- refs/tags/**
2020-08-18 15:10:09 +02:00
status:
2021-09-22 09:19:30 +02:00
- success
- failure
2020-08-18 15:10:09 +02:00
depends_on:
2021-09-22 09:19:30 +02:00
- documentation
2020-08-18 15:10:09 +02:00
---
kind: signature
2021-09-22 09:24:06 +02:00
hmac: caf424e7fa2ffcf45e2eebf15a840d2c8a256e4032d3cf8fb2a6f1cef59b42a4
2020-08-18 15:10:09 +02:00
...