-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
199 lines (187 loc) · 5.95 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
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
project_name: c3-exporter
before:
hooks:
- go mod tidy
- cmd: golangci-lint run
env:
- GOOS=linux
- govulncheck ./...
builds:
- id: c3e
main: ./cmd/c3-exporter
binary: sbin/c3-exporterd
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ignore:
- goarch: 386
- goos: openbsd
goarch: arm64
- goos: windows
goarch: arm64
flags:
- -trimpath
ldflags:
- -s
- -w
- -extldflags "-static"
- -X github.com/circonus/c3-exporter/internal/release.Version={{.Version}}
- -X github.com/circonus/c3-exporter/internal/release.Commit={{.ShortCommit}}
- -X github.com/circonus/c3-exporter/internal/release.Branch={{.Branch}}
- -X github.com/circonus/c3-exporter/internal/release.BuildDate={{.Date}}
- -X github.com/circonus/c3-exporter/internal/release.BuildTag={{.Tag}}
dockers:
-
goos: linux
goarch: amd64
goarm: ''
ids: ['c3e']
image_templates:
- "circonus/{{.ProjectName}}:{{.Tag}}-amd64"
- "circonus/{{.ProjectName}}:{{.Tag}}"
- "circonus/{{.ProjectName}}:latest-amd64"
- "circonus/{{.ProjectName}}:latest"
skip_push: false
dockerfile: builds/docker/x86_64/Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.label-schema.schema-version=1.0"
- "--label=org.label-schema.version={{.Version}}"
- "--label=org.label-schema.name={{.ProjectName}}"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/amd64"
extra_files:
- etc/example-c3-exporter.yaml
-
goos: linux
goarch: arm64
goarm: ''
ids: ['c3e']
image_templates:
- "circonus/{{.ProjectName}}:{{.Tag}}-arm64"
- "circonus/{{.ProjectName}}:latest-arm64"
skip_push: false
dockerfile: builds/docker/arm64/Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.label-schema.schema-version=1.0"
- "--label=org.label-schema.version={{.Version}}"
- "--label=org.label-schema.name={{.ProjectName}}"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/arm64"
extra_files:
- etc/example-c3-exporter.yaml
docker_manifests:
- name_template: "circonus/{{.ProjectName}}:latest"
image_templates:
- "circonus/{{.ProjectName}}:latest-amd64"
- "circonus/{{.ProjectName}}:latest-arm64"
- "circonus/{{.ProjectName}}:latest"
- name_template: "circonus/{{.ProjectName}}:{{.Tag}}"
image_templates:
- "circonus/{{.ProjectName}}:{{.Tag}}-amd64"
- "circonus/{{.ProjectName}}:{{.Tag}}-arm64"
- "circonus/{{.ProjectName}}:{{.Tag}}"
nfpms:
- vendor: Circonus, Inc.
homepage: https://circonus.com
maintainer: Circonus <support@circonus.com>
description: Circonus C3 Data Exporter
license: MIT
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}"
formats:
- deb
- rpm
bindir: /opt/circonus/c3
contents:
- src: "LICENSE"
dst: "/opt/circonus/c3/LICENSE"
- src: "README.md"
dst: "/opt/circonus/c3/README.md"
- src: "CHANGELOG.md"
dst: "/opt/circonus/c3/CHANGELOG.md"
- src: "service/circonus-c3-exporter.linux.service"
dst: "/opt/circonus/c3/service/circonus-c3-exporter.service"
- src: "service/circonus-c3-exporter.linux.init"
dst: "/opt/circonus/c3/service/circonus-c3-exporter.init"
- src: "etc/example-c3-exporter.yaml"
dst: "/opt/circonus/c3/etc/c3-exporter.yaml"
type: "config|noreplace"
overrides:
deb:
scripts:
preinstall: "builds/deb/pre-install.sh"
postinstall: "builds/deb/post-install.sh"
preremove: "builds/deb/pre-remove.sh"
postremove: "builds/deb/post-remove.sh"
rpm:
scripts:
preinstall: "builds/rpm/pre-install.sh"
postinstall: "builds/rpm/post-install.sh"
postremove: "builds/rpm/post-remove.sh"
archives:
-
id: default
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}_{{.Arch}}"
format: tar.gz
format_overrides:
-
goos: windows
format: zip
files:
- LICENSE
- README.md
- CHANGELOG.md
- etc/example-c3-exporter.yaml
- service/*
release:
github:
owner: circonus
name: c3-exporter
draft: false
prerelease: auto
changelog:
use: git
sort: desc
abbrev: 0
groups:
- title: Features
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: 'Bug fixes'
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: 'Dependencies'
regexp: "^.*build(deps):+.*$"
order: 2
- title: Others
order: 999
filters:
exclude:
- '^docs:'
- typo
checksum:
name_template: "{{.ProjectName}}_checksums.txt"
snapshot:
name_template: '{{ incpatch .Version }}-devel'
sboms:
- artifacts: archive
args: ["$artifact", "--output", "cyclonedx-json@1.5=$document"]
env:
- SYFT_GOLANG_SEARCH_LOCAL_MOD_CACHE_LICENSES=true
- SYFT_GOLANG_SEARCH_REMOTE_LICENSES=true
after:
hooks:
- cmd: bash -c 'for b in *.sbom; do grype -q --add-cpes-if-none $b; done'
dir: ./dist