-
Notifications
You must be signed in to change notification settings - Fork 428
/
.goreleaser.yml
103 lines (100 loc) · 3.13 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
dist: build
version: 2
builds:
- binary: mongodb_exporter
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
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:
version_template: "{{ .ShortCommit }}"
changelog:
use: github
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 }}-{{- if eq .Arch `amd64` }}64-bit{{- else }}{{ .Arch }}{{ end }}"
homepage: https://www.percona.com/
description: MongoDB exporter for Prometheus
maintainer: Percona
vendor: Percona
license: Apache 2.0
formats:
- deb
- rpm
bindir: /usr/bin
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
- src: LICENSE
dst: /usr/share/doc/mongodb_exporter/LICENSE