2024-02-15 01:12:57 +01:00
|
|
|
kind: pipeline
|
|
|
|
name: build
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: gofmt
|
|
|
|
image: golang:1.21.5
|
|
|
|
commands:
|
|
|
|
- gofmt -l -s .
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- name: vuln-check
|
|
|
|
image: golang:1.21.5
|
|
|
|
commands:
|
|
|
|
- go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
|
|
- govulncheck ./...
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
2024-02-16 23:01:12 +01:00
|
|
|
- name: docker
|
|
|
|
image: thegeeklab/drone-docker-buildx
|
|
|
|
privileged: true
|
|
|
|
settings:
|
|
|
|
registry: git.ar21.de
|
|
|
|
username:
|
|
|
|
from_secret: REGISTRY_USER
|
|
|
|
password:
|
|
|
|
from_secret: REGISTRY_PASS
|
|
|
|
repo: git.ar21.de/yolokube/grafana-backuper
|
|
|
|
tags:
|
|
|
|
- latest
|
|
|
|
- ${DRONE_BUILD_NUMBER}
|
|
|
|
platforms:
|
|
|
|
- linux/arm64
|
|
|
|
- linux/amd64
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
depends_on:
|
|
|
|
- gofmt
|
|
|
|
- vuln-check
|
|
|
|
- name: docker-build
|
|
|
|
image: thegeeklab/drone-docker-buildx
|
|
|
|
privileged: true
|
|
|
|
settings:
|
|
|
|
registry: git.ar21.de
|
|
|
|
username:
|
|
|
|
from_secret: REGISTRY_USER
|
|
|
|
password:
|
|
|
|
from_secret: REGISTRY_PASS
|
|
|
|
repo: git.ar21.de/yolokube/grafana-backuper
|
|
|
|
tags:
|
|
|
|
- latest
|
|
|
|
- ${DRONE_BUILD_NUMBER}
|
|
|
|
platforms:
|
|
|
|
- linux/arm64
|
|
|
|
- linux/amd64
|
|
|
|
dry_run: true
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
exclude:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
depends_on:
|
|
|
|
- gofmt
|
|
|
|
- vuln-check
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- pull_request
|