Skip to content

Commit

Permalink
[build] Include external workload images.
Browse files Browse the repository at this point in the history
Signed-off-by: Flynn <[email protected]>
  • Loading branch information
kflynn committed Mar 5, 2024
1 parent dc66741 commit 0c266d1
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}'
Expand Down
29 changes: 29 additions & 0 deletions Dockerfiles/Dockerfile.external-workload
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0c266d1

Please sign in to comment.