2023-03-08 08:05:13 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
- tag
|
|
|
|
|
|
|
|
steps:
|
2023-03-08 16:13:17 +00:00
|
|
|
- name: Setup
|
|
|
|
image: docker.io/golang:1.20-bullseye
|
|
|
|
network_mode: host
|
|
|
|
commands:
|
|
|
|
- go mod download
|
2023-03-09 11:04:11 +00:00
|
|
|
- go run github.com/magefile/mage -d build -w . generate
|
2023-03-08 16:13:17 +00:00
|
|
|
volumes:
|
|
|
|
- name: go-cache
|
|
|
|
path: /go
|
|
|
|
|
2023-03-09 11:04:11 +00:00
|
|
|
- name: Lint
|
2023-03-08 08:05:13 +00:00
|
|
|
image: docker.io/golangci/golangci-lint:latest
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: "0"
|
|
|
|
GOMEMLIMIT: "1150MiB"
|
2023-03-08 15:13:49 +00:00
|
|
|
NITTER_BASE_ADDRESS: https://code.icb4dc0.de
|
|
|
|
NITTER_TOKEN:
|
2023-03-09 13:28:33 +00:00
|
|
|
from_secret: nitter_token
|
2023-03-08 08:05:13 +00:00
|
|
|
commands:
|
2023-03-09 11:04:11 +00:00
|
|
|
- go run github.com/magefile/mage -d build -w . lint
|
2023-03-08 16:13:17 +00:00
|
|
|
depends_on:
|
|
|
|
- Setup
|
|
|
|
volumes:
|
|
|
|
- name: go-cache
|
|
|
|
path: /go
|
2023-03-08 08:05:13 +00:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
image: docker.io/golang:1.20-bullseye
|
|
|
|
network_mode: host
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: "1"
|
|
|
|
DOCKER_HOST: tcp://localhost:2375
|
|
|
|
commands:
|
|
|
|
- go install gotest.tools/gotestsum@latest
|
|
|
|
- gotestsum --junitfile out/results.xml --format pkgname-and-test-fails -- -race -shuffle=on ./...
|
2023-03-08 16:13:17 +00:00
|
|
|
depends_on:
|
|
|
|
- Setup
|
|
|
|
volumes:
|
|
|
|
- name: go-cache
|
|
|
|
path: /go
|
2023-03-08 08:05:13 +00:00
|
|
|
|
|
|
|
- name: junit-reports
|
|
|
|
image: ghcr.io/rohit-gohri/drone-junit:v0
|
|
|
|
settings:
|
|
|
|
paths: out/results.xml
|
2023-03-08 16:13:17 +00:00
|
|
|
depends_on:
|
|
|
|
- Test
|
2023-03-08 08:05:13 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: go-cache
|
|
|
|
temp: { }
|
|
|
|
|
2023-03-08 15:13:49 +00:00
|
|
|
---
|
2023-03-08 08:05:13 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: housekeeping
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- cron
|
|
|
|
cron:
|
|
|
|
- housekeeping
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Renovate
|
|
|
|
image: code.icb4dc0.de/prskr/ci-images/renovate:latest
|
|
|
|
commands:
|
|
|
|
- renovate "${DRONE_REPO}"
|
|
|
|
environment:
|
|
|
|
RENOVATE_TOKEN:
|
|
|
|
from_secret: gitea_token
|
|
|
|
GITHUB_COM_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
RENOVATE_PLATFORM: gitea
|
|
|
|
RENOVATE_AUTODISCOVER: "false"
|
|
|
|
RENOVATE_ENDPOINT: https://code.icb4dc0.de/api/v1
|
|
|
|
LOG_LEVEL: info
|