forked from kubeshop/botkube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
93 lines (93 loc) · 2.72 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
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 }}infracloudio/botkube{{ end }}
- TEST_IMAGE_REPOSITORY={{ if index .Env "TEST_IMAGE_REPOSITORY" }}{{ .Env.TEST_IMAGE_REPOSITORY }}{{ else }}infracloudio/botkube-test{{ end }}
before:
hooks:
- go mod download
builds:
- id: botkube
binary: botkube
main: cmd/botkube/main.go
ldflags: &ldflags
- -s -w
-X github.com/infracloudio/botkube/pkg/version.Version={{ .Tag }}
-X github.com/infracloudio/botkube/pkg/version.GitCommitID={{ .Commit }}
-X github.com/infracloudio/botkube/pkg/version.BuildDate={{ .Date }}
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- 7
- id: botkube-test
command: test
binary: botkube-e2e.test
main: ./test/e2e/
no_main_check: true
tags:
- integration
flags:
- -c
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
archives:
- id: my-archive
builds:
- botkube
snapshot:
name_template: "{{ .Tag }}"
release:
ids:
- botkube
changelog:
skip: true
dockers:
- image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Tag }}-amd64"
use: buildx
dockerfile: "build/Dockerfile"
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=botkube_version={{ .Tag }}"
- image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Tag }}-arm64"
use: buildx
goarch: arm64
dockerfile: "build/Dockerfile"
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=botkube_version={{ .Tag }}"
- image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Tag }}-armv7"
use: buildx
goarch: arm
goarm: 7
dockerfile: "build/Dockerfile"
build_flag_templates:
- "--platform=linux/arm"
- "--build-arg=botkube_version={{ .Tag }}"
- image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.TEST_IMAGE_REPOSITORY}}:{{ .Tag }}"
use: buildx
ids:
- botkube-test
dockerfile: "build/test.Dockerfile"
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=TEST_NAME=botkube-e2e.test"
docker_manifests:
- name_template: "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Tag }}"
image_templates:
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Tag }}-amd64"
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Tag }}-arm64"
- "{{.Env.IMAGE_REGISTRY}}/{{.Env.IMAGE_REPOSITORY}}:{{ .Tag }}-armv7"