Skip to content

Commit b81d84d

Browse files
committed
containerfile: tests: ship buildinfo.json
ship buildinfo.json in the main operator image to enable better introspection, yet to be implemented. Signed-off-by: Francesco Romani <[email protected]>
1 parent de174f7 commit b81d84d

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ FROM registry.access.redhat.com/ubi9/ubi-minimal
1010
COPY --from=builder /go/src/github.com/openshift-kni/numaresources-operator/bin/manager /bin/numaresources-operator
1111
# bundle the operand, and use a backward compatible name for RTE
1212
COPY --from=builder /go/src/github.com/openshift-kni/numaresources-operator/bin/exporter /bin/resource-topology-exporter
13+
COPY --from=builder /go/src/github.com/openshift-kni/numaresources-operator/bin/buildinfo.json /usr/local/share
1314
RUN mkdir /etc/resource-topology-exporter/ && \
1415
touch /etc/resource-topology-exporter/config.yaml
1516
RUN microdnf install -y hwdata && \

Dockerfile.openshift

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM registry.access.redhat.com/ubi9/ubi-minimal
22
COPY manager /bin/numaresources-operator
33
# bundle the operand, and use a backward compatible name for RTE
44
COPY exporter /bin/resource-topology-exporter
5+
COPY buildinfo.json /usr/local/share
56
RUN mkdir /etc/resource-topology-exporter/ && \
67
touch /etc/resource-topology-exporter/config.yaml
78
RUN microdnf install -y hwdata && \

Dockerfile.openshift.rte

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM registry.access.redhat.com/ubi9/ubi-minimal
22
COPY exporter /bin/resource-topology-exporter
3+
COPY buildinfo.json /usr/local/share
34
RUN mkdir /etc/resource-topology-exporter/ && \
45
touch /etc/resource-topology-exporter/config.yaml
56
RUN microdnf install -y hwdata && \

Makefile

+12-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ binary-numacell: build-tools
175175
LDFLAGS="-s -w" \
176176
CGO_ENABLED=0 go build -mod=vendor -o bin/numacell -ldflags "$$LDFLAGS" test/deviceplugin/cmd/numacell/main.go
177177

178-
binary-all: binary binary-rte binary-nrovalidate
178+
binary-all: goversion \
179+
binary \
180+
binary-rte \
181+
binary-nrovalidate \
182+
introspect-data
179183

180184
binary-e2e-rte-local:
181185
go test -c -v -o bin/e2e-nrop-rte-local.test ./test/e2e/rte/local
@@ -215,15 +219,21 @@ binary-e2e-all: goversion \
215219
binary-e2e-tools \
216220
binary-e2e-must-gather \
217221
runner-e2e-serial \
218-
build-pause
222+
build-pause \
223+
introspect-data
219224

220225
runner-e2e-serial: bin/envsubst
221226
hack/render-e2e-runner.sh
222227
hack/test-e2e-runner.sh
223228

229+
introspect-data: build-topics build-buildinfo
230+
224231
build-topics:
225232
mkdir -p bin && go run tools/lstopics/lstopics.go > bin/topics.json
226233

234+
build-buildinfo: bin/buildhelper
235+
bin/buildhelper inspect > bin/buildinfo.json
236+
227237
build: generate fmt vet binary
228238

229239
build-rte: fmt vet binary-rte

0 commit comments

Comments
 (0)