Skip to content

Commit

Permalink
add multi-arch build for minio-operator
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Jan 19, 2021
1 parent 288a316 commit da8836c
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 213 deletions.
95 changes: 75 additions & 20 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ builds:
goos:
- linux
goarch:
- arm64
- amd64
- ppc64le
- s390x
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X main.version={{.Tag}}
flags:
- -trimpath
hooks:
post: ./package.sh {{ .Path }}
-
id: kubectl-minio
dir: kubectl-minio
Expand All @@ -40,34 +41,88 @@ builds:
- linux
- darwin
- windows
- freebsd
goarch:
- amd64
- arm64
- ppc64le
- s390x
ignore:
- goos: darwin
goarch: arm64
- goos: windows
goarch: arm64
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X main.version={{.Tag}}
flags:
- -trimpath
hooks:
post: ./package.sh {{ .Path }}

archives:
-
format: binary
allow_different_binary_count: true
id: kubectl-minio
builds:
- kubectl-minio
format: zip

dockers:
signs:
-
# GOOS of the built binary that should be used.
goos: linux
# GOARCH of the built binary that should be used.
goarch: amd64
dockerfile: Dockerfile
image_templates:
- "minio/k8s-operator:{{ .Tag }}"
- "minio/k8s-operator:latest"
extra_files:
- LICENSE
- README.md
- CREDITS
- minio-operator.minisig
signature: "${artifact}.minisig"
cmd: "sh"
args:
- '-c'
- 'minisign -s /media/${USER}/minio/minisign.key -Sm ${artifact} < /media/${USER}/minio/minisign-passphrase'
artifacts: all

dockers:
- image_templates:
- "minio/operator:{{ .Tag }}-amd64"
use_buildx: true
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "minio/operator:{{ .Tag }}-ppc64le"
use_buildx: true
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/ppc64le"
- image_templates:
- "minio/operator:{{ .Tag }}-s390x"
use_buildx: true
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/s390x"
- image_templates:
- "minio/operator:{{ .Tag }}-arm64"
use_buildx: true
goarch: arm64
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/arm64"
docker_manifests:
- name_template: minio/operator:{{ .Tag }}
image_templates:
- minio/operator:{{ .Tag }}-amd64
- minio/operator:{{ .Tag }}-arm64
- minio/operator:{{ .Tag }}-ppc64le
- minio/operator:{{ .Tag }}-s390x
- name_template: minio/operator:latest
image_templates:
- minio/operator:{{ .Tag }}-amd64
- minio/operator:{{ .Tag }}-arm64
- minio/operator:{{ .Tag }}-ppc64le
- minio/operator:{{ .Tag }}-s390x
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@ go 1.13
require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017
github.com/georgysavva/scany v0.2.7 // indirect
github.com/google/go-containerregistry v0.1.2
github.com/gorilla/mux v1.8.0
github.com/jackc/pgx/v4 v4.10.0 // indirect
github.com/minio/minio v0.0.0-20201203193910-919441d9c4d2
github.com/minio/minio-go/v7 v7.0.6
github.com/secure-io/sio-go v0.3.1 // indirect
github.com/stretchr/testify v1.6.1
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1
gopkg.in/yaml.v2 v2.3.0
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
k8s.io/api v0.18.6
k8s.io/apimachinery v0.18.8
k8s.io/client-go v0.18.6
k8s.io/klog/v2 v2.4.0
sigs.k8s.io/controller-tools v0.4.1 // indirect
sigs.k8s.io/kind v0.9.0 // indirect
)
Loading

0 comments on commit da8836c

Please sign in to comment.