diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 8cd8a28..db52dd1 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -89,6 +89,25 @@ dockers: build_flag_templates: - "--platform=linux/amd64" + - use: buildx + goos: linux + goarch: arm64 + dockerfile: Dockerfiles/Dockerfile.external-workload + image_templates: + - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}-external-workload:{{ .Version }}-arm64" + - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}-external-workload:latest-arm64" + build_flag_templates: + - "--platform=linux/arm64" + - use: buildx + goos: linux + goarch: amd64 + dockerfile: Dockerfiles/Dockerfile.external-workload + image_templates: + - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}-external-workload:{{ .Version }}-amd64" + - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}-external-workload:latest-amd64" + build_flag_templates: + - "--platform=linux/amd64" + docker_manifests: - name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}-gui:{{ .Version }}" image_templates: @@ -126,6 +145,24 @@ docker_manifests: push_flags: - --insecure + - name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}-external-workload:latest" + image_templates: + - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}-external-workload:latest-arm64" + - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}-external-workload:latest-amd64" + create_flags: + - --insecure + push_flags: + - --insecure + + - name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}-external-workload:{{ .Version }}" + image_templates: + - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}-external-workload:{{ .Version }}-arm64" + - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}-external-workload:{{ .Version }}-amd64" + create_flags: + - --insecure + push_flags: + - --insecure + archives: - id: generic name_template: '{{ .ProjectName }}_generic_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}' diff --git a/Dockerfiles/Dockerfile.external-workload b/Dockerfiles/Dockerfile.external-workload new file mode 100644 index 0000000..bbdb5a3 --- /dev/null +++ b/Dockerfiles/Dockerfile.external-workload @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# +# SPDX-FileCopyrightText: 2022 Buoyant Inc. +# SPDX-License-Identifier: Apache-2.0 +# +# Copyright 2022-2024 Buoyant Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http:#www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ARG BASE=ghcr.io/buoyantio/demo-external-base:0.2.0 + +# Build over the external-workload base image. +FROM $BASE AS final + +# This is associated with the faces-demo repo. +LABEL org.opencontainers.image.source=https://github.com/BuoyantIO/faces-demo + +# Copy the compiled binary from the builder stage into the final image +COPY workload /workload/start