94 lines
1.7 KiB
YAML
94 lines
1.7 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
platform:
|
|
os: linux
|
|
arch: arm64
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
- pull_request
|
|
- tag
|
|
refs:
|
|
include:
|
|
- refs/heads/main
|
|
- refs/pull/**
|
|
- refs/tags/**
|
|
|
|
steps:
|
|
- name: Go generate
|
|
image: docker.io/golang:1.21-alpine
|
|
commands:
|
|
- go generate ./...
|
|
volumes:
|
|
- name: go-cache
|
|
path: /go
|
|
|
|
- name: Validate
|
|
image: docker.io/golang:1.21-alpine
|
|
network_mode: host
|
|
privileged: true
|
|
environment:
|
|
GO111MODULE: "on"
|
|
GOPRIVATE: "code.icb4dc0.de/buildr/*"
|
|
CGO_ENABLED: "0"
|
|
DOCKER_HOST: tcp://localhost:2375
|
|
BUILDR_VAULT_PASSPHRASE:
|
|
from_secret: vault_password
|
|
depends_on:
|
|
- Go generate
|
|
commands:
|
|
- apk add -U --no-cache fuse
|
|
- go install -trimpath -ldflags="-s -w" .
|
|
- buildr plugins update
|
|
- buildr --execution.log-to-stderr task go_test
|
|
- buildr --execution.log-to-stderr task golangci_lint
|
|
volumes:
|
|
- name: go-cache
|
|
path: /go
|
|
|
|
volumes:
|
|
- name: go-cache
|
|
temp: { }
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: housekeeping
|
|
|
|
platform:
|
|
os: linux
|
|
arch: arm64
|
|
|
|
trigger:
|
|
event:
|
|
- cron
|
|
cron:
|
|
- housekeeping
|
|
|
|
steps:
|
|
- name: Renovate
|
|
image: code.icb4dc0.de/prskr/ci-images/renovate:latest
|
|
commands:
|
|
- go generate ./...
|
|
- "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
|
|
volumes:
|
|
- name: go-cache
|
|
path: /go
|
|
|
|
volumes:
|
|
- name: go-cache
|
|
temp: { }
|