From b45d52f798dbb85200750bede2d1da37025844f6 Mon Sep 17 00:00:00 2001 From: Krisztian Litkey Date: Tue, 12 Nov 2024 21:43:47 +0200 Subject: [PATCH] build,Dockerfiles: enable race-detector in image builds, too. Signed-off-by: Krisztian Litkey --- Makefile | 1 + cmd/plugins/balloons/Dockerfile | 3 ++- cmd/plugins/topology-aware/Dockerfile | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 161818c4c..81612c0f2 100644 --- a/Makefile +++ b/Makefile @@ -108,6 +108,7 @@ ifeq ($(DEBUG),1) DOCKER_BUILD_DEBUG := --build-arg DEBUG=1 ifneq ($(NORACE),1) BUILD_FLAGS += -race + DOCKER_BUILD_DEBUG += --build-arg RACE=1 endif endif diff --git a/cmd/plugins/balloons/Dockerfile b/cmd/plugins/balloons/Dockerfile index 43432c40d..3d41e5ac5 100644 --- a/cmd/plugins/balloons/Dockerfile +++ b/cmd/plugins/balloons/Dockerfile @@ -6,6 +6,7 @@ ARG IMAGE_VERSION ARG BUILD_VERSION ARG BUILD_BUILDID ARG DEBUG=0 +ARG RACE=0 WORKDIR /go/builder @@ -24,7 +25,7 @@ RUN go mod download COPY . . RUN make clean -RUN make IMAGE_VERSION=${IMAGE_VERSION} BUILD_VERSION=${BUILD_VERSION} BUILD_BUILDID=${BUILD_BUILDID} PLUGINS=nri-resource-policy-balloons DEBUG=$DEBUG V=$DEBUG build-plugins-static +RUN make IMAGE_VERSION=${IMAGE_VERSION} BUILD_VERSION=${BUILD_VERSION} BUILD_BUILDID=${BUILD_BUILDID} PLUGINS=nri-resource-policy-balloons DEBUG=$DEBUG RACE=$RACE V=$DEBUG build-plugins-static RUN cpgodir() { \ mkdir -p $2; \ diff --git a/cmd/plugins/topology-aware/Dockerfile b/cmd/plugins/topology-aware/Dockerfile index 808fae8c3..0ebaf2047 100644 --- a/cmd/plugins/topology-aware/Dockerfile +++ b/cmd/plugins/topology-aware/Dockerfile @@ -6,6 +6,7 @@ ARG IMAGE_VERSION ARG BUILD_VERSION ARG BUILD_BUILDID ARG DEBUG=0 +ARG RACE=0 WORKDIR /go/builder @@ -24,7 +25,7 @@ RUN go mod download COPY . . RUN make clean -RUN make IMAGE_VERSION=${IMAGE_VERSION} BUILD_VERSION=${BUILD_VERSION} BUILD_BUILDID=${BUILD_BUILDID} PLUGINS=nri-resource-policy-topology-aware DEBUG=$DEBUG V=$DEBUG build-plugins-static +RUN make IMAGE_VERSION=${IMAGE_VERSION} BUILD_VERSION=${BUILD_VERSION} BUILD_BUILDID=${BUILD_BUILDID} PLUGINS=nri-resource-policy-topology-aware DEBUG=$DEBUG RACE=$RACE V=$DEBUG build-plugins-static RUN cpgodir() { \ mkdir -p $2; \