Skip to content

Commit

Permalink
feat: build SCMW images for arm64 (#65)
Browse files Browse the repository at this point in the history
* Add arm64 image build
* fix goreleaser deprecation
  • Loading branch information
slm0n87 authored Dec 10, 2024
1 parent 56dfa43 commit cd24274
Showing 1 changed file with 38 additions and 5 deletions.
43 changes: 38 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
version: 2

project_name: stackit-cert-manager-webhook
snapshot:
name_template: '{{ .Tag }}-SNAPSHOT'
version_template: '{{ .Tag }}-SNAPSHOT'

builds:
- id: stackit-cert-manager-webhook
goos:
Expand Down Expand Up @@ -36,12 +39,10 @@ archives:
- goos: windows
format: zip
dockers:
- id: stackit-cert-manager-webhook
- id: stackit-cert-manager-webhook-amd64
use: buildx
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .ShortCommit }}"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-amd64"
goos: linux
goarch: amd64
build_flag_templates:
Expand All @@ -53,7 +54,39 @@ dockers:
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=Apache-2.0
- --platform=linux/amd64
skip_push: false

- id: stackit-cert-manager-webhook-arm64
use: buildx
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-arm64"
goos: linux
goarch: arm64
build_flag_templates:
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description=stackit cert manager webhook for dns01 challenges
- --label=org.opencontainers.image.url=https://{{ .Env.GITHUB_SERVER_URL }}/{{ .Env.GITHUB_REPOSITORY}}
- --label=org.opencontainers.image.source=https://{{ .Env.GITHUB_SERVER_URL }}/{{ .Env.GITHUB_REPOSITORY}}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=Apache-2.0
- --label=org.opencontainers.image.platform.os=linux
- --platform=linux/arm64
skip_push: false

# https://goreleaser.com/cookbooks/multi-platform-docker-images
docker_manifests:
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}"
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-amd64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-arm64"
- name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest"
image_templates:
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-amd64"
- "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Tag }}-arm64"

checksum:
disable: false
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
Expand Down

0 comments on commit cd24274

Please sign in to comment.