forked from grafana/phlare
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
192 lines (186 loc) · 6.02 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
project_name: phlare
before:
hooks:
# This hook ensures that goreleaser uses the correct go version for a Phlare release
- sh -euc "go version | grep "go version go1.19.6 " || { echo "Unexpected go version"; exit 1; }"
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
- arm
goarm:
- "6"
- "7"
main: ./cmd/phlare
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
tags:
- netgo
ldflags:
- >
-extldflags "-static" -s -w
-X "github.com/grafana/phlare/pkg/util/build.Branch={{ .Branch }}"
-X "github.com/grafana/phlare/pkg/util/build.Version={{ .Version }}"
-X "github.com/grafana/phlare/pkg/util/build.Revision={{ .ShortCommit }}"
-X "github.com/grafana/phlare/pkg/util/build.BuildDate={{ .Env.GIT_LAST_COMMIT_DATE }}"
id: phlare
- env:
- CGO_ENABLED=0
tags:
- netgo
ldflags:
- >
-extldflags "-static" -s -w
-X "github.com/grafana/phlare/pkg/util/build.Branch={{ .Branch }}"
-X "github.com/grafana/phlare/pkg/util/build.Version={{ .Version }}"
-X "github.com/grafana/phlare/pkg/util/build.Revision={{ .ShortCommit }}"
-X "github.com/grafana/phlare/pkg/util/build.BuildDate={{ .Env.GIT_LAST_COMMIT_DATE }}"
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/phlare/Dockerfile
ids:
- phlare
- profilecli
extra_files:
- cmd/phlare/phlare.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/phlare/phlare.yaml
dockerfile: ./cmd/phlare/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/phlare/phlare.yaml
dockerfile: ./cmd/phlare/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/phlare/Dockerfile
extra_files:
- cmd/phlare/phlare.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
archives:
- id: phlare
builds:
- phlare
- 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/phlare/discussions)
- [Github Issues](https://github.com/grafana/phlare/issues)
- [Mailing List](https://groups.google.com/g/phlare-team)
## Docker Images
- [grafana/phlare](https://hub.docker.com/r/grafana/phlare/tags)
```bash
docker pull docker.io/grafana/phlare:{{ trimprefix .Tag "v" }}
```
ids:
- phlare
- 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