File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,19 +129,21 @@ function build_and_push_images() {
129129 sed -i ' s|^FROM public.ecr.aws/ubi9/ubi-minimal|FROM registry.access.redhat.com/ubi9/ubi-minimal|' deployments/container/Dockerfile
130130 sed -i ' s|^FROM registry.access.redhat.com/ubi9/ubi9-minimal|FROM registry.access.redhat.com/ubi9/ubi-minimal|' deployments/container/Dockerfile
131131 grep FROM deployments/container/Dockerfile
132- fi
133-
134- REGISTRY=localhost:${REGISTRY_PORT} GOLANG_VERSION=1.21.6 VERSION=dev make -f deployments/container/Makefile build # Always builds with docker
135-
136- if [ " $CONTAINER_RUNTIME " = " docker" ]; then
137- cr push localhost:${REGISTRY_PORT} /nvidia-device-plugin:dev
138- else
139- docker save localhost:${REGISTRY_PORT} /nvidia-device-plugin:dev | podman load
132+ GOLANG_VERSION=1.21.6 BUILDAH_FORMAT=docker cr build \
133+ -t localhost:${REGISTRY_PORT} /nvidia-device-plugin:dev \
134+ -f deployments/container/Dockerfile .
140135 cr tag localhost:${REGISTRY_PORT} /nvidia-device-plugin:dev localhost/nvidia-device-plugin:dev
141136 cr save localhost/nvidia-device-plugin:dev -o /tmp/image.tar
142137 kind load image-archive /tmp/image.tar --name " $CLUSTER_NAME "
143138 rm -f /tmp/image.tar
139+ else
140+ GOLANG_VERSION=1.21.6 cr build \
141+ -t localhost:${REGISTRY_PORT} /nvidia-device-plugin:dev \
142+ -f deployments/container/Dockerfile .
143+ cr push localhost:${REGISTRY_PORT} /nvidia-device-plugin:dev
144+
144145 fi
146+
145147 cd ..
146148 return
147149 fi
You can’t perform that action at this time.
0 commit comments