60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
---
|
|
kind: pipeline
|
|
type: kubernetes
|
|
name: python
|
|
|
|
host_aliases:
|
|
- ip: 192.168.0.210
|
|
hostnames:
|
|
- git.fqserv.eu
|
|
|
|
steps:
|
|
- name: test
|
|
image: python:latest
|
|
commands:
|
|
- pip install -q --upgrade pre-commit poetry pytest pylint pydantic rich markdownify prettytable feedgen feedparser md2gemini readability-lxml
|
|
# - pre-commit run --all-files
|
|
# - flake8 --ignore=E501,W503,E265
|
|
# - mypy --ignore-missing-imports ./tenkan/
|
|
# - pylint --disable=E1101,E0401,C0301,W1514,C0114 ./tenkan/
|
|
# - pytest ./tests/
|
|
|
|
- name: publish_pypi
|
|
image: plugins/pypi
|
|
settings:
|
|
username:
|
|
from_secret: pypi_username
|
|
password:
|
|
from_secret: pypi_password
|
|
when:
|
|
branch:
|
|
- master
|
|
|
|
- name: push_docker
|
|
image: plugins/docker
|
|
settings:
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
repo: takaoni/tenkan
|
|
tags: ["${DRONE_COMMIT_SHA:0:7}", "latest"]
|
|
dockerfile: docker/Dockerfile
|
|
when:
|
|
branch:
|
|
- master
|
|
|
|
- name: deploy_kube
|
|
image: sinlead/drone-kubectl
|
|
settings:
|
|
kubernetes_server:
|
|
from_secret: kube_url
|
|
kubernetes_cert:
|
|
from_secret: kube_cert
|
|
kubernetes_token:
|
|
from_secret: kube_token
|
|
commands:
|
|
- kubectl set image deployment/tenkan fqserv=takaoni/tenkan:"${DRONE_COMMIT_SHA:0:8}" -n gemini
|
|
when:
|
|
branch:
|
|
- master
|