forked from hetznercloud/hcloud-cloud-controller-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yml
More file actions
88 lines (79 loc) · 2.76 KB
/
.goreleaser.yml
File metadata and controls
88 lines (79 loc) · 2.76 KB
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
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.
---
version: 2
before:
hooks:
- go mod tidy
- ./scripts/release-generate-deployment-yamls.sh {{ .Version }}
builds:
- id: binary
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
- arm
binary: hcloud-cloud-controller-manager
ldflags:
- -s
- -w
- -X github.com/hetznercloud/hcloud-cloud-controller-manager/hcloud.providerVersion={{ if not .IsSnapshot }}v{{ end }}{{ .Version }}
- -X k8s.io/component-base/version.gitVersion=v0.0.0-master+v{{ .Version }}
dockers:
- id: docker-amd64
build_flag_templates: [--platform=linux/amd64]
dockerfile: Dockerfile
goarch: amd64
image_templates:
- hetznercloud/hcloud-cloud-controller-manager:{{ if not .IsSnapshot }}v{{ end }}{{ .Version }}-amd64
use: buildx
- id: docker-arm64
build_flag_templates: [--platform=linux/arm64]
dockerfile: Dockerfile
goarch: arm64
image_templates:
- hetznercloud/hcloud-cloud-controller-manager:{{ if not .IsSnapshot }}v{{ end }}{{ .Version }}-arm64v8
use: buildx
- id: docker-armv6
build_flag_templates: [--platform=linux/arm/v6]
dockerfile: Dockerfile
goarch: arm
goarm: 6
image_templates:
- hetznercloud/hcloud-cloud-controller-manager:{{ if not .IsSnapshot }}v{{ end }}{{ .Version }}-armv6
use: buildx
docker_manifests:
- id: docker-manifest
name_template: hetznercloud/hcloud-cloud-controller-manager:{{ if not .IsSnapshot }}v{{ end }}{{ .Version }}
image_templates:
- hetznercloud/hcloud-cloud-controller-manager:{{ if not .IsSnapshot }}v{{ end }}{{ .Version }}-amd64
- hetznercloud/hcloud-cloud-controller-manager:{{ if not .IsSnapshot }}v{{ end }}{{ .Version }}-arm64v8
- hetznercloud/hcloud-cloud-controller-manager:{{ if not .IsSnapshot }}v{{ end }}{{ .Version }}-armv6
archives:
- id: archive
ids:
- binary
name_template: "{{ .Binary }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
files:
- LICENSE
- README.md
release:
ids:
- archive
extra_files:
- glob: ./deploy/ccm*.yaml
- glob: ./hcloud-cloud-controller-manager-{{ .Version }}.tgz
publishers:
- name: publish-helm-chart
# Filter all artifacts, except the one generated by "release.extra_files" that
# cannot be filtered. If the "release" step does not run, the publisher will have
# not artifacts to publish.
ids: ["none"]
cmd: ./scripts/publish-helm-chart.sh hcloud-cloud-controller-manager-{{ .Version }}.tgz
env:
- CHART_REPO_REMOTE={{ .Env.CHART_REPO_REMOTE }}
# Ensures we only publish once, when $1 == $GORELEASER_ARTIFACT_FILE
- GORELEASER_ARTIFACT_FILE={{ .ArtifactPath }}