1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-09 02:24:16 +00:00

fix: fix image builds for non-amd64 architectures

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
Simon Pasquier 2024-11-04 14:06:19 +01:00
parent 2efb519a31
commit fcf21f1d78
No known key found for this signature in database
GPG key ID: 0190A66C0A10FC4F
4 changed files with 7 additions and 4 deletions

View file

@ -1,6 +1,7 @@
ARG ARCH=amd64
ARG OS=linux
ARG GOLANG_BUILDER=1.23
ARG GOARCH=
FROM quay.io/prometheus/golang-builder:${GOLANG_BUILDER}-base as builder
WORKDIR /workspace

View file

@ -193,21 +193,21 @@ image: .hack-operator-image .hack-prometheus-config-reloader-image .hack-admissi
# Create empty target file, for the sole purpose of recording when this target
# was last executed via the last-modification timestamp on the file. See
# https://www.gnu.org/software/make/manual/make.html#Empty-Targets
$(CONTAINER_CLI) build --build-arg ARCH=$(ARCH) --build-arg OS=$(GOOS) -t $(IMAGE_OPERATOR):$(TAG) .
$(CONTAINER_CLI) build --build-arg ARCH=$(ARCH) --build-arg GOARCH=$(GOARCH) --build-arg OS=$(GOOS) -t $(IMAGE_OPERATOR):$(TAG) .
touch $@
.hack-prometheus-config-reloader-image: cmd/prometheus-config-reloader/Dockerfile
# Create empty target file, for the sole purpose of recording when this target
# was last executed via the last-modification timestamp on the file. See
# https://www.gnu.org/software/make/manual/make.html#Empty-Targets
$(CONTAINER_CLI) build --build-arg ARCH=$(ARCH) --build-arg OS=$(GOOS) -t $(IMAGE_RELOADER):$(TAG) -f cmd/prometheus-config-reloader/Dockerfile .
$(CONTAINER_CLI) build --build-arg ARCH=$(ARCH) --build-arg GOARCH=$(GOARCH) --build-arg OS=$(GOOS) -t $(IMAGE_RELOADER):$(TAG) -f cmd/prometheus-config-reloader/Dockerfile .
touch $@
.hack-admission-webhook-image: cmd/admission-webhook/Dockerfile
# Create empty target file, for the sole purpose of recording when this target
# was last executed via the last-modification timestamp on the file. See
# https://www.gnu.org/software/make/manual/make.html#Empty-Targets
$(CONTAINER_CLI) build --build-arg ARCH=$(ARCH) --build-arg OS=$(GOOS) -t $(IMAGE_WEBHOOK):$(TAG) -f cmd/admission-webhook/Dockerfile .
$(CONTAINER_CLI) build --build-arg ARCH=$(ARCH) --build-arg GOARCH=$(GOARCH) --build-arg OS=$(GOOS) -t $(IMAGE_WEBHOOK):$(TAG) -f cmd/admission-webhook/Dockerfile .
touch $@
.PHONY: update-go-deps
@ -250,7 +250,7 @@ generate-crds: $(CONTROLLER_GEN_BINARY) $(GOJSONTOYAML_BINARY) $(TYPES_V1_TARGET
.PHONY: generate-remote-write-certs
generate-remote-write-certs:
mkdir -p test/e2e/remote_write_certs && \
(cd scripts && GOOS=$(OS) GOARCH=$(ARCH) go run -v ./certs/.)
(cd scripts && GOOS=$(OS) GOARCH=$(GOARCH) go run -v ./certs/.)
.PHONY: generate-docs
generate-docs: $(shell find Documentation -type f)

View file

@ -1,6 +1,7 @@
ARG ARCH=amd64
ARG OS=linux
ARG GOLANG_BUILDER=1.23
ARG GOARCH=
FROM quay.io/prometheus/golang-builder:${GOLANG_BUILDER}-base as builder
WORKDIR /workspace

View file

@ -1,6 +1,7 @@
ARG ARCH=amd64
ARG OS=linux
ARG GOLANG_BUILDER=1.23
ARG GOARCH=
FROM quay.io/prometheus/golang-builder:${GOLANG_BUILDER}-base as builder
WORKDIR /workspace