forked from percona/mongodb_exporter
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.goreleaser.yml
100 lines (98 loc) · 3.01 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
dist: build
builds:
- binary: mongodb_exporter
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm
- arm64
goarm:
- 7
ignore:
- goos: darwin
goarch: arm
flags:
- -v
ldflags:
- -s -w -X main.version=v{{.Version}} -X main.commit={{.ShortCommit}} -X main.buildDate={{.Date}}
archives:
- name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Os }}-{{ .Arch }}"
wrap_in_directory: true
snapshot:
name_template: "{{ .ShortCommit }}"
changelog:
skip: true
release:
github:
owner: percona
name: mongodb_exporter
draft: true
prerelease: auto
dockers:
- goos: linux
goarch: amd64
image_templates:
- "docker.io/percona/mongodb_exporter:{{.Major}}.{{.Minor}}-amd64"
- "docker.io/percona/mongodb_exporter:{{.Version}}-amd64"
- "ghcr.io/percona/mongodb_exporter:{{.Major}}.{{.Minor}}-amd64"
- "ghcr.io/percona/mongodb_exporter:{{.Version}}-amd64"
dockerfile: Dockerfile
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- goos: linux
goarch: arm64
image_templates:
- "docker.io/percona/mongodb_exporter:{{.Major}}.{{.Minor}}-arm64v8"
- "docker.io/percona/mongodb_exporter:{{.Version}}-arm64v8"
- "ghcr.io/percona/mongodb_exporter:{{.Major}}.{{.Minor}}-arm64v8"
- "ghcr.io/percona/mongodb_exporter:{{.Version}}-arm64v8"
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64/v8"
docker_manifests:
## Docker Hub
- name_template: docker.io/percona/mongodb_exporter:{{.Major}}.{{.Minor}}
image_templates:
- docker.io/percona/mongodb_exporter:{{.Major}}.{{.Minor}}-arm64v8
- docker.io/percona/mongodb_exporter:{{.Major}}.{{.Minor}}-amd64
- name_template: docker.io/percona/mongodb_exporter:{{.Version}}
image_templates:
- docker.io/percona/mongodb_exporter:{{.Version}}-arm64v8
- docker.io/percona/mongodb_exporter:{{.Version}}-amd64
## GHCR
- name_template: ghcr.io/percona/mongodb_exporter:{{.Major}}.{{.Minor}}
image_templates:
- ghcr.io/percona/mongodb_exporter:{{.Major}}.{{.Minor}}-arm64v8
- ghcr.io/percona/mongodb_exporter:{{.Major}}.{{.Minor}}-amd64
- name_template: ghcr.io/percona/mongodb_exporter:{{.Version}}
image_templates:
- ghcr.io/percona/mongodb_exporter:{{.Version}}-arm64v8
- ghcr.io/percona/mongodb_exporter:{{.Version}}-amd64
nfpms:
- file_name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Os }}-{{ .Arch }}"
homepage: https://www.percona.com/
description: MongoDB exporter for Prometheus
maintainer: Percona
vendor: Percona
license: Apache 2.0
formats:
- deb
- rpm
bindir: /usr/bin
replacements:
amd64: 64-bit
scripts:
postinstall: ".scripts/postinst"
contents:
- src: .scripts/systemd/mongodb_exporter.service
dst: /etc/systemd/system/mongodb_exporter.service
type: "config|noreplace"
- src: .scripts/default/mongodb_exporter.example
dst: /etc/default/mongodb_exporter.example