Skip to content

Commit

Permalink
Merge pull request #17 from KusionStack/231027-buildx
Browse files Browse the repository at this point in the history
Enhancement: support linux/arm64 image release
  • Loading branch information
wu8685 authored Oct 30, 2023
2 parents e7516bf + f0c1a6b commit a1b03f7
Showing 1 changed file with 101 additions and 7 deletions.
108 changes: 101 additions & 7 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,12 @@ dockers:
- id: manager
ids:
- ctrlmesh-manager
#skip_push: true
goos: linux
goarch: amd64
image_templates:
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}'
- 'kusionstack/ctrlmesh-manager:latest'
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}-amd64'
#- 'kusionstack/ctrlmesh-manager:latest'
dockerfile: ./artifacts/goreleaser/manager.Dockerfile
use: docker
build_flag_templates:
Expand All @@ -157,14 +158,35 @@ dockers:
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
- id: manager-arm
ids:
- ctrlmesh-manager
#skip_push: true
goos: linux
goarch: arm64
image_templates:
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}-arm64'
#- 'kusionstack/ctrlmesh-manager:latest'
dockerfile: ./artifacts/goreleaser/manager.Dockerfile
use: docker
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name=ctrlmesh-manager"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"

- id: proxy
ids:
- ctrlmesh-proxy
#skip_push: true
goos: linux
goarch: amd64
image_templates:
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}'
- 'kusionstack/ctrlmesh-proxy:latest'
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}-amd64'
#- 'kusionstack/ctrlmesh-proxy:latest'
dockerfile: ./artifacts/goreleaser/proxy.Dockerfile
extra_files:
- artifacts/scripts/
Expand All @@ -177,14 +199,37 @@ dockers:
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
- id: proxy-arm
ids:
- ctrlmesh-proxy
#skip_push: true
goos: linux
goarch: arm64
image_templates:
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}-arm64'
#- 'kusionstack/ctrlmesh-proxy:latest'
dockerfile: ./artifacts/goreleaser/proxy.Dockerfile
extra_files:
- artifacts/scripts/
use: docker
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name=ctrlmesh-proxy"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"

- id: init
ids:
- cert-generator
#skip_push: true
goos: linux
goarch: amd64
image_templates:
- 'kusionstack/ctrlmesh-init:{{ .Tag }}'
- 'kusionstack/ctrlmesh-init:latest'
- 'kusionstack/ctrlmesh-init:{{ .Tag }}-amd64'
#- 'kusionstack/ctrlmesh-init:latest'
dockerfile: ./artifacts/goreleaser/init.Dockerfile
extra_files:
- artifacts/scripts/
Expand All @@ -196,4 +241,53 @@ dockers:
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
- "--platform=linux/amd64"
- id: init-arm
ids:
- cert-generator
#skip_push: true
goos: linux
goarch: arm64
image_templates:
- 'kusionstack/ctrlmesh-init:{{ .Tag }}-arm64'
#- 'kusionstack/ctrlmesh-init:latest'
dockerfile: ./artifacts/goreleaser/init.Dockerfile
extra_files:
- artifacts/scripts/
use: docker
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name=ctrlmesh-init"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"

docker_manifests:
- name_template: 'kusionstack/ctrlmesh-manager:{{ .Tag }}'
image_templates:
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}-amd64'
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}-arm64'
- name_template: 'kusionstack/ctrlmesh-manager:latest'
image_templates:
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}-amd64'
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}-arm64'

- name_template: 'kusionstack/ctrlmesh-proxy:{{ .Tag }}'
image_templates:
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}-amd64'
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}-arm64'
- name_template: 'kusionstack/ctrlmesh-proxy:latest'
image_templates:
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}-amd64'
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}-arm64'

- name_template: 'kusionstack/ctrlmesh-init:{{ .Tag }}'
image_templates:
- 'kusionstack/ctrlmesh-init:{{ .Tag }}-amd64'
- 'kusionstack/ctrlmesh-init:{{ .Tag }}-arm64'
- name_template: 'kusionstack/ctrlmesh-init:latest'
image_templates:
- 'kusionstack/ctrlmesh-init:{{ .Tag }}-amd64'
- 'kusionstack/ctrlmesh-init:{{ .Tag }}-arm64'

0 comments on commit a1b03f7

Please sign in to comment.