Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split sidecar to have it's own goreleaser.yml #2153

Merged
merged 6 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'master'

jobs:
goreleaser:
goreleaser-operator:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
Expand All @@ -32,3 +32,26 @@ jobs:
with:
version: latest
args: release --skip=publish --clean --snapshot
goreleaser-operator-sidecar:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
workdir: sidecar
- # Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
workdir: sidecar
args: release --skip=publish --clean --snapshot
18 changes: 9 additions & 9 deletions .github/workflows/kubernetes-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ jobs:
name: Operator Sidecar Binary Cache
with:
path: |
./minio-operator-sidecar
./sidecar/minio-operator-sidecar
key: ${{ runner.os }}-sidecar-binary-${{ github.run_id }}
- name: Operator Binary
- name: Operator Sidecar Binary
working-directory: ./sidecar
run: |
make sidecar
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
name: Operator Sidecar Binary Cache
with:
path: |
./minio-operator-sidecar
./sidecar/minio-operator-sidecar
key: ${{ runner.os }}-sidecar-binary-${{ github.run_id }}
- name: Deploy Tenant
run: |
Expand Down Expand Up @@ -287,7 +287,7 @@ jobs:
name: Operator Sidecar Binary Cache
with:
path: |
./minio-operator-sidecar
./sidecar/minio-operator-sidecar
key: ${{ runner.os }}-sidecar-binary-${{ github.run_id }}
- name: Tenant upgrade test on Kind
run: |
Expand Down Expand Up @@ -317,7 +317,7 @@ jobs:
name: Operator Sidecar Binary Cache
with:
path: |
./minio-operator-sidecar
./sidecar/minio-operator-sidecar
key: ${{ runner.os }}-sidecar-binary-${{ github.run_id }}
- name: Tenant KES
run: |
Expand Down Expand Up @@ -346,7 +346,7 @@ jobs:
name: Operator Sidecar Binary Cache
with:
path: |
./minio-operator-sidecar
./sidecar/minio-operator-sidecar
key: ${{ runner.os }}-sidecar-binary-${{ github.run_id }}
- name: Deploy Tenant with cert-manager
run: |
Expand Down Expand Up @@ -385,7 +385,7 @@ jobs:
name: Operator Sidecar Binary Cache
with:
path: |
./minio-operator-sidecar
./sidecar/minio-operator-sidecar
key: ${{ runner.os }}-sidecar-binary-${{ github.run_id }}
- name: Test PolicyBinding CRD and sts call on kind
run: |
Expand Down Expand Up @@ -418,7 +418,7 @@ jobs:
name: Operator Sidecar Binary Cache
with:
path: |
./minio-operator-sidecar
./sidecar/minio-operator-sidecar
key: ${{ runner.os }}-sidecar-binary-${{ github.run_id }}
# Runs a set of commands using the runners shell
- name: Deploy a MinIO Tenant on Kind
Expand Down Expand Up @@ -455,7 +455,7 @@ jobs:
name: Operator Sidecar Binary Cache
with:
path: |
./minio-operator-sidecar
./sidecar/minio-operator-sidecar
key: ${{ runner.os }}-sidecar-binary-${{ github.run_id }}
# Runs a set of commands using the runners shell
- name: Deploy a MinIO Tenant on Kind
Expand Down
117 changes: 0 additions & 117 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@ builds:
- -s -w -X github.com/minio/operator/pkg.ReleaseTag={{.Tag}} -X github.com/minio/operator/pkg.CommitID={{.FullCommit}} -X github.com/minio/operator/pkg.Version={{.Version}} -X github.com/minio/operator/pkg.ShortCommitID={{.ShortCommit}} -X github.com/minio/operator/pkg.ReleaseTime={{.Date}}
flags:
- -trimpath
- goos:
- linux
goarch:
- arm64
- amd64
- ppc64le
- s390x
env:
- CGO_ENABLED=0
id: minio-operator-sidecar
dir: sidecar/
binary: minio-operator-sidecar
main: ./cmd/sidecar/
ldflags:
- -s -w -X github.com/minio/operator/pkg.ReleaseTag={{.Tag}} -X github.com/minio/operator/pkg.CommitID={{.FullCommit}} -X github.com/minio/operator/sidecar/pkg.Version={{.Version}} -X github.com/minio/operator/sidecar/pkg.ShortCommitID={{.ShortCommit}} -X github.com/minio/operator/pkg.ReleaseTime={{.Date}}
flags:
- -trimpath

archives:
- allow_different_binary_count: true
Expand Down Expand Up @@ -146,94 +129,6 @@ dockers:
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "minio/operator-sidecar:{{ .Tag }}-amd64"
use: buildx
goarch: amd64
dockerfile: sidecar/Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "minio/operator-sidecar:{{ .Tag }}-ppc64le"
use: buildx
dockerfile: sidecar/Dockerfile
goarch: ppc64le
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/ppc64le"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "minio/operator-sidecar:{{ .Tag }}-s390x"
use: buildx
goarch: s390x
dockerfile: sidecar/Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/s390x"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "minio/operator-sidecar:{{ .Tag }}-arm64"
use: buildx
goarch: arm64
dockerfile: sidecar/Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "quay.io/minio/operator-sidecar:{{ .Tag }}-amd64"
use: buildx
goarch: amd64
dockerfile: sidecar/Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "quay.io/minio/operator-sidecar:{{ .Tag }}-ppc64le"
use: buildx
dockerfile: sidecar/Dockerfile
goarch: ppc64le
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/ppc64le"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "quay.io/minio/operator-sidecar:{{ .Tag }}-s390x"
use: buildx
goarch: s390x
dockerfile: sidecar/Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/s390x"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "quay.io/minio/operator-sidecar:{{ .Tag }}-arm64"
use: buildx
goarch: arm64
dockerfile: sidecar/Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=TAG={{ .Tag }}"
docker_manifests:
- name_template: minio/operator:{{ .Tag }}
image_templates:
Expand All @@ -247,15 +142,3 @@ docker_manifests:
- quay.io/minio/operator:{{ .Tag }}-arm64
- quay.io/minio/operator:{{ .Tag }}-ppc64le
- quay.io/minio/operator:{{ .Tag }}-s390x
- name_template: minio/operator-sidecar:{{ .Tag }}
image_templates:
- minio/operator-sidecar:{{ .Tag }}-amd64
- minio/operator-sidecar:{{ .Tag }}-arm64
- minio/operator-sidecar:{{ .Tag }}-ppc64le
- minio/operator-sidecar:{{ .Tag }}-s390x
- name_template: quay.io/minio/operator-sidecar:{{ .Tag }}
image_templates:
- quay.io/minio/operator-sidecar:{{ .Tag }}-amd64
- quay.io/minio/operator-sidecar:{{ .Tag }}-arm64
- quay.io/minio/operator-sidecar:{{ .Tag }}-ppc64le
- quay.io/minio/operator-sidecar:{{ .Tag }}-s390x
143 changes: 143 additions & 0 deletions sidecar/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
project_name: operator-sidecar

release:
name_template: "Version {{.Version}}"
github:
owner: minio
name: operator
extra_files:
- glob: "*.minisig"
- glob: "*.zip"

before:
hooks:
- make clean
- go mod tidy -compat=1.21.8
- go mod download

builds:
- id: minio-operator-sidecar
goos:
- linux
goarch:
- arm64
- amd64
- ppc64le
- s390x
env:
- CGO_ENABLED=0
binary: minio-operator-sidecar
main: ./cmd/sidecar/
ldflags:
- -s -w -X github.com/minio/operator/pkg.ReleaseTag={{.Tag}} -X github.com/minio/operator/pkg.CommitID={{.FullCommit}} -X github.com/minio/operator/sidecar/pkg.Version={{.Version}} -X github.com/minio/operator/sidecar/pkg.ShortCommitID={{.ShortCommit}} -X github.com/minio/operator/pkg.ReleaseTime={{.Date}}
flags:
- -trimpath

archives:
- allow_different_binary_count: true
format: binary

dockers:
- image_templates:
- "minio/operator-sidecar:{{ .Tag }}-amd64"
use: buildx
goarch: amd64
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "minio/operator-sidecar:{{ .Tag }}-ppc64le"
use: buildx
dockerfile: Dockerfile
goarch: ppc64le
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/ppc64le"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "minio/operator-sidecar:{{ .Tag }}-s390x"
use: buildx
goarch: s390x
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/s390x"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "minio/operator-sidecar:{{ .Tag }}-arm64"
use: buildx
goarch: arm64
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "quay.io/minio/operator-sidecar:{{ .Tag }}-amd64"
use: buildx
goarch: amd64
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "quay.io/minio/operator-sidecar:{{ .Tag }}-ppc64le"
use: buildx
dockerfile: Dockerfile
goarch: ppc64le
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/ppc64le"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "quay.io/minio/operator-sidecar:{{ .Tag }}-s390x"
use: buildx
goarch: s390x
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/s390x"
- "--build-arg=TAG={{ .Tag }}"
- image_templates:
- "quay.io/minio/operator-sidecar:{{ .Tag }}-arm64"
use: buildx
goarch: arm64
dockerfile: Dockerfile
extra_files:
- LICENSE
- CREDITS
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=TAG={{ .Tag }}"
docker_manifests:
- name_template: minio/operator-sidecar:{{ .Tag }}
image_templates:
- minio/operator-sidecar:{{ .Tag }}-amd64
- minio/operator-sidecar:{{ .Tag }}-arm64
- minio/operator-sidecar:{{ .Tag }}-ppc64le
- minio/operator-sidecar:{{ .Tag }}-s390x
- name_template: quay.io/minio/operator-sidecar:{{ .Tag }}
image_templates:
- quay.io/minio/operator-sidecar:{{ .Tag }}-amd64
- quay.io/minio/operator-sidecar:{{ .Tag }}-arm64
- quay.io/minio/operator-sidecar:{{ .Tag }}-ppc64le
- quay.io/minio/operator-sidecar:{{ .Tag }}-s390x
Loading
Loading