forked from grafana/pyroscope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
212 lines (205 loc) · 6.62 KB
/
.goreleaser.yaml
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
project_name: pyroscope
before:
hooks:
# This hook ensures that goreleaser uses the correct go version for a Pyroscope release
- sh -euc "go version | grep "go version go1.21.1 " || { echo "Unexpected go version"; exit 1; }"
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
- arm
goarm:
- "6"
- "7"
main: ./cmd/pyroscope
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
tags:
- netgo
- embedassets
ldflags:
- >
-extldflags "-static" -s -w
-X "github.com/grafana/pyroscope/pkg/util/build.Branch={{ .Branch }}"
-X "github.com/grafana/pyroscope/pkg/util/build.Version={{ .Version }}"
-X "github.com/grafana/pyroscope/pkg/util/build.Revision={{ .ShortCommit }}"
-X "github.com/grafana/pyroscope/pkg/util/build.BuildDate={{ .CommitDate }}"
id: pyroscope
- env:
- CGO_ENABLED=0
tags:
- netgo
ldflags:
- >
-extldflags "-static" -s -w
-X "github.com/grafana/pyroscope/pkg/util/build.Branch={{ .Branch }}"
-X "github.com/grafana/pyroscope/pkg/util/build.Version={{ .Version }}"
-X "github.com/grafana/pyroscope/pkg/util/build.Revision={{ .ShortCommit }}"
-X "github.com/grafana/pyroscope/pkg/util/build.BuildDate={{ .CommitDate }}"
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
- arm
goarm:
- "6"
- "7"
ignore:
- goos: windows
goarch: arm
main: ./cmd/profilecli
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
binary: profilecli
id: profilecli
dockers:
- use: buildx
goos: linux
goarch: amd64
dockerfile: ./cmd/pyroscope/Dockerfile
ids:
- pyroscope
- profilecli
extra_files:
- cmd/pyroscope/pyroscope.yaml
image_templates:
- "grafana/{{ .ProjectName }}:{{ .Version }}-amd64"
- "grafana/{{ .ProjectName }}:latest-amd64"
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- use: buildx
goos: linux
goarch: arm64
extra_files:
- cmd/pyroscope/pyroscope.yaml
dockerfile: ./cmd/pyroscope/Dockerfile
image_templates:
- "grafana/{{ .ProjectName }}:{{ .Version }}-arm64v8"
- "grafana/{{ .ProjectName }}:latest-arm64v8"
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- use: buildx
goos: linux
goarch: arm
goarm: "6"
extra_files:
- cmd/pyroscope/pyroscope.yaml
dockerfile: ./cmd/pyroscope/Dockerfile
image_templates:
- "grafana/{{ .ProjectName }}:{{ .Version }}-armv6"
- "grafana/{{ .ProjectName }}:latest-armv6"
build_flag_templates:
- "--platform=linux/arm/v6"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- use: buildx
goos: linux
goarch: arm
goarm: "7"
dockerfile: ./cmd/pyroscope/Dockerfile
extra_files:
- cmd/pyroscope/pyroscope.yaml
image_templates:
- "grafana/{{ .ProjectName }}:{{ .Version }}-armv7"
- "grafana/{{ .ProjectName }}:latest-armv7"
build_flag_templates:
- "--platform=linux/arm/v7"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
docker_manifests:
# https://goreleaser.com/customization/docker_manifest/
- name_template: grafana/{{ .ProjectName }}:{{ .Version }}
image_templates:
- grafana/{{ .ProjectName }}:{{ .Version }}-amd64
- grafana/{{ .ProjectName }}:{{ .Version }}-arm64v8
- grafana/{{ .ProjectName }}:{{ .Version }}-armv6
- grafana/{{ .ProjectName }}:{{ .Version }}-armv7
- name_template: grafana/{{ .ProjectName }}:latest
image_templates:
- grafana/{{ .ProjectName }}:latest-amd64
- grafana/{{ .ProjectName }}:latest-arm64v8
- grafana/{{ .ProjectName }}:latest-armv6
- grafana/{{ .ProjectName }}:latest-armv7
nfpms:
- id: pyroscope
formats:
- deb
- rpm
section: default
maintainer: Grafana Labs <support@grafana.com>
vendor: Grafana Labs Inc
homepage: https://grafana.com/pyroscope
license: AGPL-3.0
contents:
- src: ./tools/packaging/pyroscope.service
dst: /etc/systemd/system/pyroscope.service
- src: ./cmd/pyroscope/pyroscope.yaml
dst: /etc/pyroscope/config.yml
type: config|noreplace
scripts:
postinstall: ./tools/packaging/postinstall.sh
archives:
- id: pyroscope
builds:
- pyroscope
- id: profilecli
name_template: 'profilecli_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
builds:
- profilecli
format_overrides:
- goos: windows
format: zip
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
release:
draft: true
footer: |
As always, feedbacks are more than welcome, feel free to open issues/discussions.
You can reach out to the team using:
- [Slack](https://grafana.slack.com/archives/C047CCW6YM8)
- [Github Discussions](https://github.com/grafana/pyroscope/discussions)
- [Github Issues](https://github.com/grafana/pyroscope/issues)
- [Mailing List](https://groups.google.com/g/pyroscope-team)
## Docker Images
- [grafana/pyroscope](https://hub.docker.com/r/grafana/pyroscope/tags)
```bash
docker pull docker.io/grafana/pyroscope:{{ trimprefix .Tag "v" }}
```
ids:
- pyroscope
- profilecli
# milestones:
# - close: true
# modelines, feel free to remove those if you don't want/use them:
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj