mirror of
https://github.com/rancher/k3k.git
synced 2026-02-14 18:10:01 +00:00
149 lines
3.8 KiB
YAML
149 lines
3.8 KiB
YAML
version: 2
|
|
|
|
release:
|
|
draft: true
|
|
replace_existing_draft: true
|
|
prerelease: auto
|
|
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
- go generate ./...
|
|
|
|
builds:
|
|
- id: k3k
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
goarch:
|
|
- "amd64"
|
|
- "arm64"
|
|
- "s390x"
|
|
ldflags:
|
|
- -w -s # strip debug info and symbol table
|
|
- -X "github.com/rancher/k3k/pkg/buildinfo.Version={{ .Tag }}"
|
|
|
|
- id: k3k-kubelet
|
|
main: ./k3k-kubelet
|
|
binary: k3k-kubelet
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
goarch:
|
|
- "amd64"
|
|
- "arm64"
|
|
- "s390x"
|
|
ldflags:
|
|
- -w -s # strip debug info and symbol table
|
|
- -X "github.com/rancher/k3k/pkg/buildinfo.Version={{ .Tag }}"
|
|
|
|
- id: k3kcli
|
|
main: ./cli
|
|
binary: k3kcli
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goarch:
|
|
- "amd64"
|
|
- "arm64"
|
|
ldflags:
|
|
- -w -s # strip debug info and symbol table
|
|
- -X "github.com/rancher/k3k/pkg/buildinfo.Version={{ .Tag }}"
|
|
|
|
archives:
|
|
- format: binary
|
|
name_template: >-
|
|
{{ .Binary }}-{{- .Os }}-{{ .Arch }}
|
|
{{- if .Arm }}v{{ .Arm }}{{ end }}
|
|
format_overrides:
|
|
- goos: windows
|
|
format: zip
|
|
|
|
# For the image_templates we are using the following expression to build images for the correct registry
|
|
# {{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}
|
|
#
|
|
# REGISTRY= -> rancher/k3k:vX.Y.Z
|
|
# REGISTRY=ghcr.io -> ghcr.io/rancher/k3k:latest:vX.Y.Z
|
|
#
|
|
dockers:
|
|
# k3k amd64
|
|
- use: buildx
|
|
goarch: amd64
|
|
ids:
|
|
- k3k
|
|
- k3kcli
|
|
dockerfile: "package/Dockerfile.k3k"
|
|
skip_push: false
|
|
image_templates:
|
|
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}:{{ .Tag }}-amd64"
|
|
build_flag_templates:
|
|
- "--build-arg=BIN_K3K=k3k"
|
|
- "--build-arg=BIN_K3KCLI=k3kcli"
|
|
- "--pull"
|
|
- "--platform=linux/amd64"
|
|
|
|
# k3k arm64
|
|
- use: buildx
|
|
goarch: arm64
|
|
ids:
|
|
- k3k
|
|
- k3kcli
|
|
dockerfile: "package/Dockerfile.k3k"
|
|
skip_push: false
|
|
image_templates:
|
|
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}:{{ .Tag }}-arm64"
|
|
build_flag_templates:
|
|
- "--build-arg=BIN_K3K=k3k"
|
|
- "--build-arg=BIN_K3KCLI=k3kcli"
|
|
- "--pull"
|
|
- "--platform=linux/arm64"
|
|
|
|
# k3k-kubelet amd64
|
|
- use: buildx
|
|
goarch: amd64
|
|
ids:
|
|
- k3k-kubelet
|
|
dockerfile: "package/Dockerfile.k3k-kubelet"
|
|
skip_push: false
|
|
image_templates:
|
|
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}-kubelet:{{ .Tag }}-amd64"
|
|
build_flag_templates:
|
|
- "--build-arg=BIN_K3K_KUBELET=k3k-kubelet"
|
|
- "--pull"
|
|
- "--platform=linux/amd64"
|
|
|
|
# k3k-kubelet arm64
|
|
- use: buildx
|
|
goarch: arm64
|
|
ids:
|
|
- k3k-kubelet
|
|
dockerfile: "package/Dockerfile.k3k-kubelet"
|
|
skip_push: false
|
|
image_templates:
|
|
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}-kubelet:{{ .Tag }}-arm64"
|
|
build_flag_templates:
|
|
- "--build-arg=BIN_K3K_KUBELET=k3k-kubelet"
|
|
- "--pull"
|
|
- "--platform=linux/arm64"
|
|
|
|
docker_manifests:
|
|
# k3k
|
|
- name_template: "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}:{{ .Tag }}"
|
|
image_templates:
|
|
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}:{{ .Tag }}-amd64"
|
|
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}:{{ .Tag }}-arm64"
|
|
|
|
# k3k-kubelet arm64
|
|
- name_template: "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}-kubelet:{{ .Tag }}"
|
|
image_templates:
|
|
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}-kubelet:{{ .Tag }}-amd64"
|
|
- "{{- if .Env.REGISTRY }}{{ .Env.REGISTRY }}/{{ end }}{{ .Env.REPO }}-kubelet:{{ .Tag }}-arm64"
|
|
|
|
changelog:
|
|
sort: asc
|
|
filters:
|
|
exclude:
|
|
- "^docs:"
|
|
- "^test:"
|