Markus Pesch
1843f826cf
All checks were successful
continuous-integration/drone/push Build is passing
152 lines
2.4 KiB
YAML
152 lines
2.4 KiB
YAML
---
|
|
kind: pipeline
|
|
type: kubernetes
|
|
name: linter
|
|
|
|
steps:
|
|
- name: markdown lint
|
|
commands:
|
|
- markdownlint *.md
|
|
image: docker.io/volkerraschek/markdownlint:0.32.2
|
|
resources:
|
|
limits:
|
|
cpu: 150
|
|
memory: 150M
|
|
|
|
- name: golangci lint
|
|
commands:
|
|
- golangci-lint run
|
|
image: docker.io/golangci/golangci-lint:v1.50.1-alpine
|
|
resources:
|
|
limits:
|
|
cpu: 500
|
|
memory: 1G
|
|
|
|
- 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: 150
|
|
memory: 150M
|
|
when:
|
|
status:
|
|
- changed
|
|
- failure
|
|
|
|
trigger:
|
|
event:
|
|
exclude:
|
|
- tag
|
|
|
|
---
|
|
kind: pipeline
|
|
type: kubernetes
|
|
name: unit-test-amd64
|
|
|
|
depends_on:
|
|
- linter
|
|
|
|
node_selector:
|
|
kubernetes.io/arch: amd64
|
|
|
|
steps:
|
|
- name: unit-test
|
|
commands:
|
|
- go test -v ./...
|
|
image: docker.io/library/golang:1.19.3
|
|
resources:
|
|
limits:
|
|
cpu: 250
|
|
memory: 500M
|
|
|
|
trigger:
|
|
event:
|
|
exclude:
|
|
- tag
|
|
|
|
---
|
|
kind: pipeline
|
|
type: kubernetes
|
|
name: unit-test-arm64
|
|
|
|
depends_on:
|
|
- linter
|
|
|
|
node_selector:
|
|
kubernetes.io/arch: arm64
|
|
|
|
steps:
|
|
- name: unit-test
|
|
commands:
|
|
- go test -v ./...
|
|
image: docker.io/library/golang:1.19.3
|
|
resources:
|
|
limits:
|
|
cpu: 250
|
|
memory: 500M
|
|
|
|
trigger:
|
|
event:
|
|
exclude:
|
|
- tag
|
|
|
|
---
|
|
kind: pipeline
|
|
type: kubernetes
|
|
name: sync
|
|
|
|
node_selector:
|
|
kubernetes.io/arch: amd64
|
|
|
|
steps:
|
|
- name: github
|
|
image: docker.io/appleboy/drone-git-push:latest
|
|
resources:
|
|
limits:
|
|
cpu: 50
|
|
memory: 25M
|
|
settings:
|
|
branch: master
|
|
remote: ssh://git@github.com/volker-raschek/dyndns-client.git
|
|
force: true
|
|
ssh_key:
|
|
from_secret: ssh_key
|
|
|
|
- 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: 150
|
|
memory: 150M
|
|
when:
|
|
status:
|
|
- changed
|
|
- failure
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
repo:
|
|
- volker.raschek/dyndns-client |