forked from zhangjianweibj/prometheus-libvirt-exporter
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.goreleaser.yml
122 lines (115 loc) · 3.48 KB
/
.goreleaser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
project_name: prometheus-libvirt-exporter
before:
hooks:
- go mod tidy
- go mod download
builds:
- id: prometheus-libvirt-exporter
dir: .
main: ./main.go
binary: prometheus-libvirt-exporter
flags:
- -tags=netgo
- -v
- -a
ldflags:
- -w -s
- -X main.version={{ .Version }} -X main.commit={{ .Commit }}
goos:
- darwin
- freebsd
- linux
goarch:
- amd64
- arm
- arm64
- riscv64
goarm:
- "5"
- "6"
- "7"
ignore:
- goos: darwin
goarch: arm
- goos: darwin
goarch: riscv64
dockers:
- ids:
- prometheus-libvirt-exporter
image_templates:
- ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}-amd64
goos: linux
goarch: amd64
dockerfile: goreleaser.dockerfile
build_flag_templates:
- "--build-arg=BINARY_NAME={{ .ProjectName }}"
- "--platform=linux/amd64"
use: buildx
- ids:
- prometheus-libvirt-exporter
image_templates:
- ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}-arm64
goos: linux
goarch: arm64
dockerfile: goreleaser.dockerfile
build_flag_templates:
- "--build-arg=BINARY_NAME={{ .ProjectName }}"
- "--platform=linux/arm64"
use: buildx
- ids:
- prometheus-libvirt-exporter
image_templates:
- ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}-riscv64
goos: linux
goarch: riscv64
dockerfile: goreleaser.dockerfile
build_flag_templates:
- "--build-arg=BINARY_NAME={{ .ProjectName }}"
- "--platform=linux/riscv64"
use: buildx
docker_manifests:
- name_template: 'ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}'
image_templates:
- 'ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}-amd64'
- 'ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}-arm64'
- 'ghcr.io/inovex/{{ .ProjectName }}:{{ .Version }}-riscv64'
#Configuration for building packages for apk, deb and rpm package managers
nfpms:
- id: "prometheus-libvirt-exporter"
package_name: "prometheus-libvirt-exporter"
file_name_template: prometheus-libvirt-exporter-{{ .Version }}.{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}
builds:
- prometheus-libvirt-exporter
maintainer: "inovex"
description: |
Prometheus-libvirt-exporter service (host and vm metrics exposed for prometheus, written in Go with pluggable metric collectors)
homepage: "https://github.com/inovex/prometheus-libvirt-exporter"
license: "MIT License"
formats:
- deb
- rpm
bindir: "/usr/bin"
priority: optional
contents:
- src: contrib/prometheus-libvirt-exporter.service
dst: /etc/systemd/system/prometheus-libvirt-exporter.service
archives:
- name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}"
format: tar.gz
wrap_in_directory: true
checksum:
name_template: "{{ .ProjectName }}-{{ .Version }}_checksums.txt"
algorithm: sha256
# Configuration for GitHub Releases
release:
github:
owner: inovex
name: prometheus-libvirt-exporter
footer: |
## Docker Images
- ghcr.io/inovex/prometheus-libvirt-exporter:{{ trimprefix .Tag "v" }} (universal, multi-platform)
- ghcr.io/inovex/prometheus-libvirt-exporter:{{ trimprefix .Tag "v" }}-amd64
- ghcr.io/inovex/prometheus-libvirt-exporter:{{ trimprefix .Tag "v" }}-arm64
- ghcr.io/inovex/prometheus-libvirt-exporter:{{ trimprefix .Tag "v" }}-riscv64
prerelease: auto
replace_existing_draft: true