forked from kubeshop/tracetest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
177 lines (166 loc) · 4.96 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
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
project_name: tracetest
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
release:
# discussion_category_name: General
draft: false
prerelease: auto
# extra_files:
# - glob: ./dist/architecture.png
before:
hooks:
- dir: ./server
cmd: go mod tidy
- dir: ./cli
cmd: go mod tidy
env:
- VERSION={{ if index .Env "VERSION" }}{{ .Env.VERSION }}{{ else }}dev{{ end }}
- TRACETEST_ENV={{ if index .Env "TRACETEST_ENV" }}{{ .Env.TRACETEST_ENV }}{{ else }}dev{{ end }}
- ANALYTICS_BE_KEY={{ if index .Env "ANALYTICS_BE_KEY" }}{{ .Env.ANALYTICS_BE_KEY }}{{ else }}{{ end }}
- ANALYTICS_FE_KEY={{ if index .Env "ANALYTICS_FE_KEY" }}{{ .Env.ANALYTICS_FE_KEY }}{{ else }}{{ end }}
- TRACETEST_DEFAULT_CLOUD_ENDPOINT={{ if index .Env "TRACETEST_DEFAULT_CLOUD_ENDPOINT" }}{{ .Env.TRACETEST_DEFAULT_CLOUD_ENDPOINT }}{{ else }}{{ end }}
builds:
- id: server
binary: tracetest-server
main: ./server/main.go
ldflags:
- -X github.com/kubeshop/tracetest/server/version.Version={{ .Env.VERSION }}
- -X github.com/kubeshop/tracetest/server/version.Env={{ .Env.TRACETEST_ENV }}
- -X github.com/kubeshop/tracetest/server/analytics.SecretKey={{ .Env.ANALYTICS_BE_KEY }}
- -X github.com/kubeshop/tracetest/server/analytics.FrontendKey={{ .Env.ANALYTICS_FE_KEY }}
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- "386"
- amd64
- arm
- arm64
goarm:
- "7"
- id: cli
binary: tracetest
main: ./cli/main.go
ldflags:
- -X github.com/kubeshop/tracetest/cli/config.Version={{ .Env.VERSION }}
- -X github.com/kubeshop/tracetest/cli/config.DefaultCloudEndpoint={{ .Env.TRACETEST_DEFAULT_CLOUD_ENDPOINT }}
- -X github.com/kubeshop/tracetest/cli/config.Env={{ .Env.TRACETEST_ENV }}
- -X github.com/kubeshop/tracetest/cli/analytics.SecretKey={{ .Env.ANALYTICS_BE_KEY }}
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- "386"
- amd64
- arm
- arm64
goarm:
- "7"
snapshot:
name_template: '{{ incpatch .Version }}-next'
nightly:
publish_release: true
keep_single_release: true
name_template: 'latest'
dockers:
- image_templates:
- 'kubeshop/tracetest:{{ .Env.VERSION }}-amd64'
extra_files:
- web/build
- server/migrations
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
goos: linux
goarch: amd64
use: buildx
- image_templates:
- 'kubeshop/tracetest:{{ .Env.VERSION }}-arm64'
extra_files:
- web/build
- server/migrations
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64/v8"
goos: linux
goarch: arm64
use: buildx
docker_manifests:
- name_template: 'kubeshop/tracetest:{{ .Env.VERSION }}'
image_templates:
- 'kubeshop/tracetest:{{ .Env.VERSION }}-amd64'
- 'kubeshop/tracetest:{{ .Env.VERSION }}-arm64'
- name_template: '{{ if not .IsNightly }}kubeshop/tracetest:latest{{ end }}'
image_templates:
- 'kubeshop/tracetest:{{ .Env.VERSION }}-amd64'
- 'kubeshop/tracetest:{{ .Env.VERSION }}-arm64'
archives:
- name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- .Os }}_
{{- if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- with .Arm }}v{{ . }}{{ end }}
{{- with .Mips }}_{{ . }}{{ end }}
{{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}
checksum:
name_template: 'checksums.txt'
universal_binaries:
- replace: true
nfpms:
- vendor: Kubeshop
homepage: https://tracetest.kubeshop.io/
maintainer: Sebastian Choren <[email protected]>
license: MIT
formats:
- deb
- rpm
file_name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- .Os }}_
{{- if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- with .Arm }}v{{ . }}{{ end }}
{{- with .Mips }}_{{ . }}{{ end }}
{{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}
deb:
lintian_overrides:
- statically-linked-binary
publishers:
- name: fury.io
env:
- 'FURY_TOKEN={{ .Env.FURY_TOKEN }}'
- DISABLED={{ if .IsNightly }}true{{ end }}
cmd: ./scripts/fury-upload.sh {{ .ArtifactName }}
brews:
- repository:
owner: kubeshop
name: homebrew-tracetest
commit_author:
name: Brew Bot
email: [email protected]
homepage: https://tracetest.kubeshop.io/
license: "MIT"