Skip to content

Commit

Permalink
build,Dockerfiles: enable race-detector in image builds, too.
Browse files Browse the repository at this point in the history
Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub committed Nov 12, 2024
1 parent c003258 commit b45d52f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion cmd/plugins/balloons/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ARG IMAGE_VERSION
ARG BUILD_VERSION
ARG BUILD_BUILDID
ARG DEBUG=0
ARG RACE=0

WORKDIR /go/builder

Expand All @@ -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; \
Expand Down
3 changes: 2 additions & 1 deletion cmd/plugins/topology-aware/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ARG IMAGE_VERSION
ARG BUILD_VERSION
ARG BUILD_BUILDID
ARG DEBUG=0
ARG RACE=0

WORKDIR /go/builder

Expand All @@ -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; \
Expand Down

0 comments on commit b45d52f

Please sign in to comment.