111 lines
1.6 KiB
YAML
111 lines
1.6 KiB
YAML
---
|
||
kind: pipeline
|
||
type: kubernetes
|
||
name: linter
|
||
|
||
platform:
|
||
os: linux
|
||
|
||
steps:
|
||
- name: markdown lint
|
||
commands:
|
||
- markdownlint *.md
|
||
image: docker.io/volkerraschek/markdownlint:0.33.0
|
||
resources:
|
||
limits:
|
||
cpu: 50
|
||
memory: 50M
|
||
|
||
- name: email-notification
|
||
environment:
|
||
SMTP_FROM_ADDRESS:
|
||
from_secret: smtp_from_address
|
||
SMTP_FROM_NAME:
|
||
from_secret: smtp_from_name
|
||
SMTP_HOST:
|
||
from_secret: smtp_host
|
||
SMTP_USERNAME:
|
||
from_secret: smtp_username
|
||
SMTP_PASSWORD:
|
||
from_secret: smtp_password
|
||
image: docker.io/volkerraschek/drone-email:0.1.1
|
||
resources:
|
||
limits:
|
||
cpu: 50
|
||
memory: 25M
|
||
when:
|
||
status:
|
||
- changed
|
||
- failure
|
||
|
||
trigger:
|
||
event:
|
||
include:
|
||
- pull_request
|
||
- push
|
||
exclude:
|
||
- tag
|
||
|
||
---
|
||
kind: pipeline
|
||
type: kubernetes
|
||
name: unit-test-amd64
|
||
|
||
depends_on:
|
||
- linter
|
||
|
||
platform:
|
||
arсh: amd64
|
||
|
||
steps:
|
||
- name: unit-test
|
||
commands:
|
||
- go test -v ./...
|
||
image: docker.io/library/golang:1.20.2
|
||
|
||
services:
|
||
- name: postgres
|
||
image: postgres:15.2-alpine
|
||
environment:
|
||
POSTGRES_USER: postgres
|
||
POSTGRES_PASSWORD: postgres
|
||
POSTGRES_DB: postgres
|
||
|
||
trigger:
|
||
event:
|
||
exclude:
|
||
- tag
|
||
|
||
---
|
||
kind: pipeline
|
||
type: kubernetes
|
||
name: unit-test-arm64
|
||
|
||
depends_on:
|
||
- linter
|
||
|
||
platform:
|
||
arсh: arm64
|
||
|
||
steps:
|
||
- name: unit-test
|
||
commands:
|
||
- go test -v ./...
|
||
image: docker.io/library/golang:1.20.2
|
||
|
||
services:
|
||
- name: postgres
|
||
image: postgres:15.2-alpine
|
||
environment:
|
||
POSTGRES_USER: postgres
|
||
POSTGRES_PASSWORD: postgres
|
||
POSTGRES_DB: postgres
|
||
|
||
trigger:
|
||
event:
|
||
include:
|
||
- pull_request
|
||
- push
|
||
exclude:
|
||
- tag
|