Skip to content

Commit 32818b4

Browse files
committed
release/goreleaser.opm.Dockerfile: parameterize grpc-health-probe version
Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
1 parent 017ab53 commit 32818b4

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export PKG := github.com/operator-framework/operator-registry
99
export GIT_COMMIT := $(or $(SOURCE_GIT_COMMIT),$(shell git rev-parse --short HEAD))
1010
export OPM_VERSION := $(or $(SOURCE_GIT_TAG),$(shell git describe --always --tags HEAD))
1111
export BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
12+
export GRPC_HEALTH_PROBE_VERSION := $(shell $(GO) list -m github.com/grpc-ecosystem/grpc-health-probe | awk '{print $$2}')
1213

1314
.DEFAULT_GOAL := all
1415

release/goreleaser.linux.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ dockers:
8787
use: buildx
8888
build_flag_templates:
8989
- --platform=linux/amd64
90+
- --build-arg=GRPC_HEALTH_PROBE_VERSION={{ .Env.GRPC_HEALTH_PROBE_VERSION }}
9091
- image_templates:
9192
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
9293
ids: ["linux-arm64"]
@@ -97,6 +98,7 @@ dockers:
9798
use: buildx
9899
build_flag_templates:
99100
- --platform=linux/arm64
101+
- --build-arg=GRPC_HEALTH_PROBE_VERSION={{ .Env.GRPC_HEALTH_PROBE_VERSION }}
100102
- image_templates:
101103
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
102104
ids: ["linux-ppc64le"]
@@ -107,6 +109,7 @@ dockers:
107109
use: buildx
108110
build_flag_templates:
109111
- --platform=linux/ppc64le
112+
- --build-arg=GRPC_HEALTH_PROBE_VERSION={{ .Env.GRPC_HEALTH_PROBE_VERSION }}
110113
- image_templates:
111114
- "{{ .Env.OPM_IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
112115
ids: ["linux-s390x"]
@@ -117,6 +120,7 @@ dockers:
117120
use: buildx
118121
build_flag_templates:
119122
- --platform=linux/s390x
123+
- --build-arg=GRPC_HEALTH_PROBE_VERSION={{ .Env.GRPC_HEALTH_PROBE_VERSION }}
120124
docker_manifests:
121125
# IMAGE_TAG is either set by the Makefile or the goreleaser action workflow,
122126
# This image is intended to be tagged/pushed on all trunk (master, release branch) commits and tags.

release/goreleaser.opm.Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# NOTE: This Dockerfile is used in conjuction with GoReleaser to
22
# build opm images. See the configurations in .goreleaser.yaml
33
# and .github/workflows/release.yaml.
4+
#
5+
# The GRPC_HEALTH_PROBE_VERSION is automatically passed as a build arg
6+
# by GoReleaser from the GRPC_HEALTH_PROBE_VERSION environment variable,
7+
# which is set in the Makefile from go.mod.
48

5-
FROM ghcr.io/grpc-ecosystem/grpc-health-probe:v0.4.37 AS grpc_health_probe
9+
ARG GRPC_HEALTH_PROBE_VERSION
10+
FROM ghcr.io/grpc-ecosystem/grpc-health-probe:${GRPC_HEALTH_PROBE_VERSION} AS grpc_health_probe
611
FROM gcr.io/distroless/static:debug
712
COPY --from=grpc_health_probe /ko-app/grpc-health-probe /bin/grpc_health_probe
813
COPY ["nsswitch.conf", "/etc/nsswitch.conf"]

0 commit comments

Comments
 (0)