2020-08-18 13:10:09 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: lint
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
2023-01-31 19:09:29 +00:00
|
|
|
- name: check-format
|
|
|
|
image: python:3.11
|
2021-09-22 07:19:30 +00:00
|
|
|
commands:
|
2023-01-31 19:09:29 +00:00
|
|
|
- git fetch -tq
|
|
|
|
- pip install poetry -qq
|
|
|
|
- poetry install --all-extras
|
|
|
|
- poetry run yapf -dr ./plugins
|
|
|
|
environment:
|
|
|
|
PY_COLORS: 1
|
|
|
|
|
|
|
|
- name: check-coding
|
|
|
|
image: python:3.11
|
|
|
|
commands:
|
|
|
|
- git fetch -tq
|
|
|
|
- pip install poetry -qq
|
|
|
|
- poetry install --all-extras
|
|
|
|
- poetry run ruff ./plugins
|
2021-09-22 07:19:30 +00:00
|
|
|
environment:
|
|
|
|
PY_COLORS: 1
|
2020-08-18 13:10:09 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
2022-06-20 20:22:58 +00:00
|
|
|
- refs/heads/main
|
2021-09-22 07:19:30 +00:00
|
|
|
- refs/tags/**
|
|
|
|
- refs/pull/**
|
2020-08-18 13:10:09 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
2023-01-31 19:09:29 +00:00
|
|
|
name: unit-test
|
2020-08-18 13:10:09 +00:00
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
2021-12-06 15:42:26 +00:00
|
|
|
- name: python38-pytest
|
|
|
|
image: python:3.8
|
2021-09-22 07:19:30 +00:00
|
|
|
commands:
|
2023-01-31 19:09:29 +00:00
|
|
|
- pip install poetry -qq
|
|
|
|
- poetry install --all-extras
|
|
|
|
- poetry run pytest
|
2021-09-22 07:19:30 +00:00
|
|
|
environment:
|
|
|
|
PY_COLORS: 1
|
|
|
|
depends_on:
|
|
|
|
- clone
|
|
|
|
|
2021-12-06 15:42:26 +00:00
|
|
|
- name: python39-pytest
|
|
|
|
image: python:3.9
|
2021-09-22 07:19:30 +00:00
|
|
|
commands:
|
2023-01-31 19:09:29 +00:00
|
|
|
- pip install poetry -qq
|
|
|
|
- poetry install --all-extras
|
|
|
|
- poetry run pytest
|
2021-09-22 07:19:30 +00:00
|
|
|
environment:
|
|
|
|
PY_COLORS: 1
|
|
|
|
depends_on:
|
|
|
|
- clone
|
|
|
|
|
2021-12-06 15:42:26 +00:00
|
|
|
- name: python310-pytest
|
|
|
|
image: python:3.10
|
2021-09-22 07:19:30 +00:00
|
|
|
commands:
|
2023-01-31 19:09:29 +00:00
|
|
|
- pip install poetry -qq
|
|
|
|
- poetry install --all-extras
|
|
|
|
- poetry run pytest
|
|
|
|
environment:
|
|
|
|
PY_COLORS: 1
|
|
|
|
depends_on:
|
|
|
|
- clone
|
|
|
|
|
|
|
|
- name: python311-pytest
|
|
|
|
image: python:3.11
|
|
|
|
commands:
|
|
|
|
- pip install poetry -qq
|
|
|
|
- poetry install --all-extras
|
|
|
|
- poetry run pytest
|
2021-09-22 07:19:30 +00:00
|
|
|
environment:
|
|
|
|
PY_COLORS: 1
|
|
|
|
depends_on:
|
|
|
|
- clone
|
2020-08-18 13:10:09 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
2022-06-20 20:22:58 +00:00
|
|
|
- refs/heads/main
|
2021-09-22 07:19:30 +00:00
|
|
|
- refs/tags/**
|
|
|
|
- refs/pull/**
|
2020-08-18 13:10:09 +00:00
|
|
|
|
|
|
|
depends_on:
|
2021-09-22 07:19:30 +00:00
|
|
|
- lint
|
2020-08-18 13:10:09 +00:00
|
|
|
|
2023-01-31 19:09:29 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: sanity-test
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
workspace:
|
|
|
|
path: /drone/src/ansible_collections/${DRONE_REPO_NAME/./\/}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: ansible-devel
|
2023-07-29 20:41:39 +00:00
|
|
|
image: python:3.10
|
2023-01-31 19:09:29 +00:00
|
|
|
commands:
|
|
|
|
- pip install poetry -qq
|
|
|
|
- poetry install
|
|
|
|
- poetry run pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
|
|
|
|
- poetry run ansible --version
|
|
|
|
- poetry run ansible-test sanity --exclude .chglog/ --exclude .drone.yml --python 3.9
|
|
|
|
environment:
|
|
|
|
PY_COLORS: 1
|
|
|
|
depends_on:
|
|
|
|
- clone
|
|
|
|
|
2023-07-29 20:41:39 +00:00
|
|
|
- name: ansible-215
|
|
|
|
image: python:3.10
|
2023-01-31 19:09:29 +00:00
|
|
|
commands:
|
|
|
|
- pip install poetry -qq
|
|
|
|
- poetry install
|
2023-07-29 20:41:39 +00:00
|
|
|
- poetry run pip install https://github.com/ansible/ansible/archive/stable-2.15.tar.gz --disable-pip-version-check
|
2023-01-31 19:09:29 +00:00
|
|
|
- poetry run ansible --version
|
|
|
|
- poetry run ansible-test sanity --exclude .chglog/ --exclude .drone.yml --python 3.9
|
|
|
|
environment:
|
|
|
|
PY_COLORS: 1
|
|
|
|
depends_on:
|
|
|
|
- clone
|
|
|
|
|
2023-07-29 20:41:39 +00:00
|
|
|
- name: ansible-214
|
|
|
|
image: python:3.10
|
2023-01-31 19:09:29 +00:00
|
|
|
commands:
|
|
|
|
- pip install poetry -qq
|
|
|
|
- poetry install
|
2023-07-29 20:41:39 +00:00
|
|
|
- poetry run pip install https://github.com/ansible/ansible/archive/stable-2.14.tar.gz --disable-pip-version-check
|
2023-01-31 19:09:29 +00:00
|
|
|
- poetry run ansible --version
|
|
|
|
- poetry run ansible-test sanity --exclude .chglog/ --exclude .drone.yml --python 3.9
|
|
|
|
environment:
|
|
|
|
PY_COLORS: 1
|
|
|
|
depends_on:
|
|
|
|
- clone
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/main
|
|
|
|
- refs/tags/**
|
|
|
|
- refs/pull/**
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- unit-test
|
|
|
|
|
2020-08-18 13:10:09 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: build
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
2021-09-22 07:19:30 +00:00
|
|
|
- name: build
|
2023-01-31 19:09:29 +00:00
|
|
|
image: python:3.11
|
2021-09-22 07:19:30 +00:00
|
|
|
commands:
|
|
|
|
- GALAXY_VERSION=${DRONE_TAG##v}
|
|
|
|
- "sed -i 's/version: 0.0.0/version: '\"$${GALAXY_VERSION:-0.0.0}\"'/g' galaxy.yml"
|
2023-01-31 19:09:29 +00:00
|
|
|
- pip install poetry -qq
|
|
|
|
- poetry install --all-extras
|
|
|
|
- poetry run ansible-galaxy collection build --output-path dist/
|
2021-09-22 07:19:30 +00:00
|
|
|
|
|
|
|
- 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 13:10:09 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
2022-06-20 20:22:58 +00:00
|
|
|
- refs/heads/main
|
2021-09-22 07:19:30 +00:00
|
|
|
- refs/tags/**
|
|
|
|
- refs/pull/**
|
2020-08-18 13:10:09 +00:00
|
|
|
|
|
|
|
depends_on:
|
2023-01-31 19:09:29 +00:00
|
|
|
- sanity-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:
|
2021-09-22 07:19:30 +00: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 18:07:48 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
2022-06-20 20:22:58 +00:00
|
|
|
- refs/heads/main
|
2021-09-22 07:19:30 +00:00
|
|
|
- refs/tags/**
|
2020-08-22 18:07:48 +00:00
|
|
|
|
|
|
|
depends_on:
|
2021-09-22 07:19:30 +00:00
|
|
|
- build
|
2020-08-22 18:07:48 +00:00
|
|
|
|
2020-08-18 13:10:09 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: notifications
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
2021-09-22 07:19:30 +00:00
|
|
|
- name: matrix
|
|
|
|
image: thegeeklab/drone-matrix
|
|
|
|
settings:
|
|
|
|
homeserver:
|
|
|
|
from_secret: matrix_homeserver
|
|
|
|
password:
|
|
|
|
from_secret: matrix_password
|
|
|
|
roomid:
|
|
|
|
from_secret: matrix_roomid
|
2023-02-08 20:27:04 +00:00
|
|
|
template: "Status: **{{ .Build.Status }}**<br/> Build: [{{ .Repo.Owner }}/{{ .Repo.Name }}]({{ .Build.Link }}){{ if .Build.Branch }} ({{ .Build.Branch }}){{ end }} by {{ .Commit.Author }}<br/> Message: {{ .Commit.Message.Title }}"
|
2021-09-22 07:19:30 +00:00
|
|
|
username:
|
|
|
|
from_secret: matrix_username
|
2020-08-18 13:10:09 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
2022-06-20 20:22:58 +00:00
|
|
|
- refs/heads/main
|
2021-09-22 07:19:30 +00:00
|
|
|
- refs/tags/**
|
2020-08-18 13:10:09 +00:00
|
|
|
status:
|
2021-09-22 07:19:30 +00:00
|
|
|
- success
|
|
|
|
- failure
|
2020-08-18 13:10:09 +00:00
|
|
|
|
|
|
|
depends_on:
|
2021-09-22 07:19:30 +00:00
|
|
|
- documentation
|
2020-08-18 13:10:09 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: signature
|
2023-07-29 20:41:39 +00:00
|
|
|
hmac: d60a76cb5820c26f16756634312756f06a51c55d81aad7e863c6925a43ae2346
|
2020-08-18 13:10:09 +00:00
|
|
|
|
|
|
|
...
|