forked from utkuozdemir/nvidia_gpu_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
173 lines (164 loc) · 4.69 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---
before:
hooks:
- go mod download
builds:
- id: nvidia_gpu_exporter
main: ./cmd/nvidia_gpu_exporter
binary: nvidia_gpu_exporter
ldflags:
- -s -w
- -X github.com/prometheus/common/version.Version={{.Version}}
- -X github.com/prometheus/common/version.Revision={{.Commit}}
- -X github.com/prometheus/common/version.Branch={{.Branch}}
- -X github.com/prometheus/common/version.BuildUser=goreleaser
- -X github.com/prometheus/common/version.BuildDate={{.Date}}
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm
- arm64
- "386"
goarm:
- "7"
ignore:
- goos: windows
goarch: arm
- goos: windows
goarch: arm64
- goos: darwin
goarch: arm
- goos: darwin
goarch: arm64
- goos: darwin
goarch: "386"
- goos: linux
goarch: "386"
archives:
- id: nvidia_gpu_exporter-archive
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- with .Arm }}v{{ . }}{{ end }}
{{- with .Mips }}_{{ . }}{{ end }}
{{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}
builds:
- nvidia_gpu_exporter
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
nfpms:
- id: nvidia_gpu_exporter
package_name: nvidia-gpu-exporter
bindir: /usr/bin
vendor: Utku Ozdemir
homepage: https://github.com/utkuozdemir/nvidia_gpu_exporter
license: MIT
maintainer: Utku Ozdemir <[email protected]>
section: misc
description: |-
Nvidia GPU exporter for prometheus.
This is a simple exporter that uses `nvidia-smi(.exe)` binary to collect,
parse and export metrics.
formats:
- deb
- rpm
contents:
- src: ./systemd/nvidia_gpu_exporter.service
dst: /usr/lib/systemd/system/nvidia_gpu_exporter.service
file_info:
owner: root
group: root
mode: 0644
- src: ./LICENSE
dst: /usr/share/doc/nvidia-gpu-exporter/copyright
file_info:
owner: root
group: root
mode: 0644
scripts:
preinstall: scripts/pre-install.sh
postinstall: scripts/post-install.sh
preremove: scripts/pre-remove.sh
postremove: scripts/post-remove.sh
deb:
lintian_overrides:
- statically-linked-binary
- changelog-file-missing-in-native-package
- no-manual-page
# Probably won't be implemented: https://github.com/goreleaser/nfpm/issues/15#issuecomment-830816661
- maintainer-script-calls-systemctl
checksum:
name_template: checksums.txt
algorithm: sha256
changelog:
sort: asc
filters:
exclude:
- '^build(\(.+\))?:'
- '^chore(\(.+\))?:'
- '^cd(\(.+\))?:'
- '^ci(\(.+\))?:'
- '^cicd(\(.+\))?:'
- '^docker(\(.+\))?:'
- '^docs(\(.+\))?:'
- '^refactor(\(.+\))?:'
- '^test(\(.+\))?:'
- Merge pull request
- Merge branch
- go mod tidy
dockers:
- image_templates:
- docker.io/utkuozdemir/nvidia_gpu_exporter:{{ .Version }}-amd64
use: buildx
dockerfile: Dockerfile
build_flag_templates:
- --platform=linux/amd64
- image_templates:
- docker.io/utkuozdemir/nvidia_gpu_exporter:{{ .Version }}-arm64
use: buildx
goarch: arm64
dockerfile: Dockerfile
build_flag_templates:
- --platform=linux/arm64
- image_templates:
- docker.io/utkuozdemir/nvidia_gpu_exporter:{{ .Version }}-armv7
use: buildx
goarch: arm
goarm: "7"
dockerfile: Dockerfile
build_flag_templates:
- --platform=linux/arm/v7
docker_manifests:
- name_template: docker.io/utkuozdemir/nvidia_gpu_exporter:{{ .Version }}
image_templates:
- docker.io/utkuozdemir/nvidia_gpu_exporter:{{ .Version }}-amd64
- docker.io/utkuozdemir/nvidia_gpu_exporter:{{ .Version }}-arm64
- docker.io/utkuozdemir/nvidia_gpu_exporter:{{ .Version }}-armv7
# To test docker image push, uncomment the following and run
# goreleaser release --skip-validate --rm-dist --debug
#release:
# disable: true
scoops:
- repository:
owner: utkuozdemir
name: scoop_nvidia_gpu_exporter
token: "{{ .Env.PRIVATE_ACCESS_TOKEN }}"
commit_author:
name: Utku Ozdemir
email: [email protected]
commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
homepage: https://github.com/utkuozdemir/nvidia_gpu_exporter
description: Nvidia GPU exporter for prometheus using nvidia-smi binary
license: MIT