2021-12-06 20:28:06 +00:00
|
|
|
---
|
2021-09-08 19:24:50 +00:00
|
|
|
kind: pipeline
|
2021-12-06 20:23:03 +00:00
|
|
|
name: test
|
2021-09-08 19:24:50 +00:00
|
|
|
|
|
|
|
steps:
|
2021-12-05 15:25:49 +00:00
|
|
|
- name: lint
|
2021-09-08 20:07:21 +00:00
|
|
|
image: alpine
|
2021-09-08 20:01:49 +00:00
|
|
|
commands:
|
2021-12-11 17:50:28 +00:00
|
|
|
- apk add --no-cache python3 py3-lxml py3-setproctitle py3-pip py3-wheel py3-enchant hunspell-en
|
2021-12-04 13:26:40 +00:00
|
|
|
- pip3 install --no-cache-dir .[full] .[dev]
|
2021-12-05 15:29:08 +00:00
|
|
|
- isort --check-only --diff .
|
2021-09-08 20:01:49 +00:00
|
|
|
- pylint morss --rcfile=.pylintrc --disable=C,R,W --fail-under=8
|
2021-12-05 15:26:53 +00:00
|
|
|
|
2021-12-06 20:23:03 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: python
|
|
|
|
|
2021-12-06 20:28:06 +00:00
|
|
|
steps:
|
2021-12-06 20:23:03 +00:00
|
|
|
- name: publish
|
2021-12-05 15:26:53 +00:00
|
|
|
image: plugins/pypi
|
|
|
|
settings:
|
|
|
|
username:
|
2021-12-05 15:30:59 +00:00
|
|
|
from_secret: pypi_user
|
2021-12-05 15:26:53 +00:00
|
|
|
password:
|
2021-12-05 15:30:59 +00:00
|
|
|
from_secret: pypi_pwd
|
2021-12-05 18:51:42 +00:00
|
|
|
|
2021-12-25 11:12:13 +00:00
|
|
|
- name: push
|
|
|
|
image: appleboy/drone-scp
|
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: ssh_host
|
|
|
|
username:
|
|
|
|
from_secret: ssh_user
|
|
|
|
key:
|
|
|
|
from_secret: ssh_key
|
|
|
|
source:
|
|
|
|
- dist/morss-*.tar.gz
|
|
|
|
- morss-helper
|
|
|
|
|
|
|
|
- name: deploy
|
|
|
|
image: appleboy/drone-ssh
|
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: ssh_host
|
|
|
|
username:
|
|
|
|
from_secret: ssh_user
|
|
|
|
key:
|
|
|
|
from_secret: ssh_key
|
|
|
|
script_stop: true
|
|
|
|
script:
|
|
|
|
- sudo pip install --upgrade morss-*.tar.gz[full]
|
|
|
|
- sudo mv morss-helper /usr/bin/local/morss-helper
|
|
|
|
- sudo rm /root/morss-*.tar.gz morss-helper
|
|
|
|
- sudo morss-helper reload
|
|
|
|
|
2021-12-06 20:23:03 +00:00
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- test
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: docker
|
|
|
|
|
2021-12-06 20:28:06 +00:00
|
|
|
steps:
|
2021-12-06 20:23:03 +00:00
|
|
|
- name: publish
|
2021-12-07 11:53:06 +00:00
|
|
|
image: thegeeklab/drone-docker-buildx
|
2021-12-08 22:11:01 +00:00
|
|
|
# NB. this requires qemu installed on host
|
2021-12-07 11:53:06 +00:00
|
|
|
privileged: true
|
2021-12-05 18:51:42 +00:00
|
|
|
settings:
|
|
|
|
username:
|
|
|
|
from_secret: docker_user
|
|
|
|
password:
|
|
|
|
from_secret: docker_pwd
|
|
|
|
repo:
|
|
|
|
from_secret: docker_repo
|
|
|
|
tags: latest
|
2021-12-09 23:51:22 +00:00
|
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
2021-12-06 20:23:03 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- test
|