2020-08-18 13:10:09 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: lint
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: flake8
|
2021-02-19 12:47:26 +00:00
|
|
|
image: python:3.9
|
2020-08-18 13:10:09 +00:00
|
|
|
commands:
|
|
|
|
- pip install -r dev-requirements.txt -qq
|
|
|
|
- flake8
|
|
|
|
environment:
|
|
|
|
PY_COLORS: 1
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/master
|
|
|
|
- refs/tags/**
|
|
|
|
- refs/pull/**
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: test
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
2021-02-19 12:47:26 +00:00
|
|
|
- name: python36-pytest
|
|
|
|
image: python:3.6
|
2020-08-18 13:10:09 +00:00
|
|
|
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
|
|
|
|
|
2021-02-19 12:47:26 +00:00
|
|
|
- name: python37-pytest
|
|
|
|
image: python:3.7
|
2020-08-18 13:10:09 +00:00
|
|
|
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
|
|
|
|
|
2021-02-19 12:47:26 +00:00
|
|
|
- name: python38-pytest
|
|
|
|
image: python:3.8
|
2020-08-18 13:10:09 +00:00
|
|
|
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
|
|
|
|
|
2021-02-19 12:47:26 +00:00
|
|
|
- name: python39-pytest
|
|
|
|
image: python:3.9
|
2020-08-18 13:10:09 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/master
|
|
|
|
- refs/tags/**
|
|
|
|
- refs/pull/**
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- lint
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: build
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
2021-02-19 12:47:26 +00:00
|
|
|
image: python:3.9
|
2020-08-18 13:10:09 +00:00
|
|
|
commands:
|
2021-03-27 14:00:02 +00:00
|
|
|
- GALAXY_VERSION=${DRONE_TAG:##v}
|
|
|
|
- "sed -i 's/version: 0.0.0/version: '\"$${GALAXY_VERSION:-0.0.0}\"'/g' galaxy.yml"
|
2020-08-18 13:10:09 +00:00
|
|
|
- pip install ansible -qq
|
|
|
|
- ansible-galaxy collection build --output-path dist/
|
|
|
|
|
|
|
|
- name: checksum
|
|
|
|
image: alpine
|
|
|
|
commands:
|
|
|
|
- cd dist/ && sha256sum * > ../sha256sum.txt
|
|
|
|
|
2021-02-19 12:38:30 +00:00
|
|
|
- name: changelog
|
|
|
|
image: thegeeklab/git-chglog
|
|
|
|
commands:
|
|
|
|
- git fetch -tq
|
|
|
|
- git-chglog --no-color --no-emoji ${DRONE_TAG:---next-tag unreleased unreleased}
|
|
|
|
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
|
|
|
|
|
2020-08-18 13:10:09 +00:00
|
|
|
- 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/**
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/master
|
|
|
|
- refs/tags/**
|
|
|
|
- refs/pull/**
|
|
|
|
|
|
|
|
depends_on:
|
2020-08-18 13:12:23 +00:00
|
|
|
- test
|
2020-08-18 13:10:09 +00:00
|
|
|
|
2020-08-22 18:07:48 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: documentation
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- 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
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/master
|
|
|
|
- refs/tags/**
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- build
|
|
|
|
|
2020-08-18 13:10:09 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: notifications
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: matrix
|
|
|
|
image: plugins/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 }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
|
|
|
|
username:
|
|
|
|
from_secret: matrix_username
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/master
|
|
|
|
- refs/tags/**
|
|
|
|
status:
|
|
|
|
- success
|
|
|
|
- failure
|
|
|
|
|
|
|
|
depends_on:
|
2020-08-22 18:07:48 +00:00
|
|
|
- documentation
|
2020-08-18 13:10:09 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: signature
|
2021-03-27 14:00:02 +00:00
|
|
|
hmac: 3755090863d1c4215ec5fce44c2e8efa825bda82afac5f2de4132bf4bf18fc2e
|
2020-08-18 13:10:09 +00:00
|
|
|
|
|
|
|
...
|