-
Notifications
You must be signed in to change notification settings - Fork 289
/
.goreleaser.yml
182 lines (176 loc) · 6.59 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
project_name: botkube
env:
- IMAGE_REGISTRY={{ if index .Env "IMAGE_REGISTRY" }}{{ .Env.IMAGE_REGISTRY }}{{ else }}ghcr.io{{ end }}
- IMAGE_REPOSITORY={{ if index .Env "IMAGE_REPOSITORY" }}{{ .Env.IMAGE_REPOSITORY }}{{ else }}kubeshop/botkube{{ end }}
- IMAGE_TAG={{ if index .Env "IMAGE_TAG" }}{{ .Env.IMAGE_TAG }}{{ else }}{{ .Tag }}{{ end }}
- CFG_EXPORTER_IMAGE_REPOSITORY={{ if index .Env "CFG_EXPORTER_IMAGE_REPOSITORY" }}{{ .Env.CFG_EXPORTER_IMAGE_REPOSITORY }}{{ else }}kubeshop/botkube-config-exporter{{ end }}
- ANALYTICS_API_KEY={{ if index .Env "ANALYTICS_API_KEY" }}{{ .Env.ANALYTICS_API_KEY }}{{ else }}{{ end }}
- CLI_ANALYTICS_API_KEY={{ if index .Env "CLI_ANALYTICS_API_KEY" }}{{ .Env.CLI_ANALYTICS_API_KEY }}{{ else }}{{ end }}
- HOMEBREW_REPO_OWNER={{ if index .Env "HOMEBREW_REPO_OWNER" }}{{ .Env.HOMEBREW_REPO_OWNER }}{{ else }}kubeshop{{ end }}
- HOMEBREW_REPO_NAME={{ if index .Env "HOMEBREW_REPO_NAME" }}{{ .Env.HOMEBREW_REPO_NAME }}{{ else }}homebrew-botkube{{ end }}
before:
hooks:
- go mod download
builds:
- id: botkube-agent
binary: botkube-agent
main: cmd/botkube-agent/main.go
ldflags: &ldflags
- -s -w
-X github.com/kubeshop/botkube/pkg/version.Version={{ .Env.IMAGE_TAG }}
-X github.com/kubeshop/botkube/pkg/version.GitCommitID={{ .Commit }}
-X github.com/kubeshop/botkube/pkg/version.BuildDate={{ .Date }}
-X github.com/kubeshop/botkube/internal/analytics.APIKey={{ .Env.ANALYTICS_API_KEY }}
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- "7"
- id: botkube-cli
binary: botkube
main: cmd/cli/main.go
ldflags:
- -s -w
-X github.com/kubeshop/botkube/cmd/cli/cmd/migrate.DefaultImageTag={{ .Env.IMAGE_TAG }}
-X github.com/kubeshop/botkube/internal/cli/analytics.APIKey={{ .Env.CLI_ANALYTICS_API_KEY }}
-X go.szostok.io/version.version={{.Version}}
-X go.szostok.io/version.buildDate={{.Date}}
-X go.szostok.io/version.commit={{.FullCommit}}
-X go.szostok.io/version.commitDate={{.CommitDate}}
-X go.szostok.io/version.name=botkube
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm
- arm64
goarm:
- "7"
- id: botkube-config-exporter
binary: botkube-config-exporter
main: cmd/config-exporter/main.go
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- "7"
snapshot:
name_template: "{{ .Env.IMAGE_TAG }}"
release:
# If set to true, will not auto-publish the release.
draft: true
prerelease: auto
# Add extra pre-existing files to the release.
# Prerequisites:
# - build plugin binaries
# - build plugin index.yaml
extra_files:
- glob: ./plugin-dist/executor_*.tar.gz
- glob: ./plugin-dist/source_*.tar.gz
- glob: ./plugins-index.yaml
- glob: ./plugins-dev-index.yaml
changelog:
skip: false
dockers:
# Botkube Agent
- image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}-amd64"
use: buildx
dockerfile: "build/Dockerfile"
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=botkube_version={{ .Env.IMAGE_TAG }}"
id: botkube-agent-amd64
- image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}-arm64"
use: buildx
goarch: arm64
dockerfile: "build/Dockerfile"
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=botkube_version={{ .Env.IMAGE_TAG }}"
id: botkube-agent-arm64
- image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}-armv7"
use: buildx
goarch: arm
goarm: 7
dockerfile: "build/Dockerfile"
build_flag_templates:
- "--platform=linux/arm"
- "--build-arg=botkube_version={{ .Env.IMAGE_TAG }}"
id: botkube-agent-armv7
# Config Exporter
- image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.CFG_EXPORTER_IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}-amd64"
use: buildx
dockerfile: "build/Dockerfile.config_exporter"
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=botkube_config_exporter_version={{ .Env.IMAGE_TAG }}"
id: botkube-config-exporter-amd64
- image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.CFG_EXPORTER_IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}-arm64"
use: buildx
goarch: arm64
dockerfile: "build/Dockerfile.config_exporter"
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=botkube_config_exporter_version={{ .Env.IMAGE_TAG }}"
id: botkube-config-exporter-arm64
- image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.CFG_EXPORTER_IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}-armv7"
use: buildx
goarch: arm
goarm: 7
dockerfile: "build/Dockerfile.config_exporter"
build_flag_templates:
- "--platform=linux/arm"
- "--build-arg=botkube_config_exporter_version={{ .Env.IMAGE_TAG }}"
id: botkube-config-exporter-armv7
docker_manifests:
- name_template: "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}"
image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}-amd64"
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}-arm64"
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}-armv7"
- name_template: "{{.Env.IMAGE_REGISTRY}}/{{.Env.CFG_EXPORTER_IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}"
image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.CFG_EXPORTER_IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}-amd64"
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.CFG_EXPORTER_IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}-arm64"
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.CFG_EXPORTER_IMAGE_REPOSITORY}}:{{ .Env.IMAGE_TAG }}-armv7"
archives:
- id: botkube-cli
format: binary
name_template: "{{ .Binary }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
builds:
- botkube-cli
brews:
- name: botkube
ids:
- botkube-cli
tap:
owner: "{{.Env.HOMEBREW_REPO_OWNER}}"
name: "{{.Env.HOMEBREW_REPO_NAME}}"
token: "{{ .Env.GITHUB_TOKEN }}"
download_strategy: CurlDownloadStrategy
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://botkube.io"
description: "Botkube CLI is a command line tool for managing Botkube resources"
license: "MIT"
test: |
system "#{bin}/botkube version -o=short"