grafana-backuper/.drone.yml

125 lines
2.6 KiB
YAML
Raw Normal View History

kind: pipeline
name: build
steps:
- name: gofmt
image: golang:1.23.0
commands:
- gofmt -l -s .
when:
event:
- push
2024-06-19 21:29:50 +02:00
- name: golangci-linter
image: golangci/golangci-lint:v1.59.1
commands:
- golangci-lint run --enable-all ./...
when:
event:
- push
- name: vuln-check
image: golang:1.23.0
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
2024-06-19 21:29:50 +02:00
- golangci-linter
2024-02-16 23:01:12 +01:00
- 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
2024-06-19 21:29:50 +02:00
- golangci-linter
2024-02-16 23:01:12 +01:00
- vuln-check
2024-02-23 11:47:35 +01:00
- name: bump tag in deployment-repo
2024-05-24 09:56:51 +02:00
image: git.ar21.de/aaron/kustomize-ci
2024-02-23 11:47:35 +01:00
commands:
- cd /deployment-repo
- git clone https://git.ar21.de/yolokube/grafana-backuper-deployment.git .
- cd /deployment-repo/overlay
- kustomize edit set image git.ar21.de/yolokube/grafana-backuper=git.ar21.de/yolokube/grafana-backuper:${DRONE_BUILD_NUMBER}
volumes:
- name: deployment-repo
path: /deployment-repo
when:
branch:
- main
event:
- push
depends_on:
- docker
- name: push new tag to deployment-repo
image: appleboy/drone-git-push
settings:
branch: main
remote: ssh://git@git.ar21.de:2222/yolokube/grafana-backuper-deployment.git
path: /deployment-repo
force: false
commit: true
commit_message: "GRAFANA-BACKUPER: update image tag to ${DRONE_BUILD_NUMBER} (done automagically via Drone pipeline)"
ssh_key:
from_secret: GITEA_SSH_KEY
volumes:
- name: deployment-repo
path: /deployment-repo
when:
branch:
- main
event:
- push
depends_on:
- bump tag in deployment-repo
volumes:
- name: deployment-repo
temp: {}
2024-02-16 23:01:12 +01:00
when:
event:
exclude:
- pull_request
2024-02-23 11:47:35 +01:00