From 5bcd16a14fee5cb00f9bb36e49d5ce7c19cec5e7 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Mon, 11 Mar 2024 10:34:01 +0100 Subject: [PATCH] Use k8s-test-infra devel image Signed-off-by: Carlos Eduardo Arango Gutierrez --- Makefile | 7 ++++--- deployments/container/Dockerfile.devel | 29 -------------------------- 2 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 deployments/container/Dockerfile.devel diff --git a/Makefile b/Makefile index 6205ec97..bfd1e32b 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,8 @@ TARGETS := $(MAKE_TARGETS) $(CMD_TARGETS) DOCKER_TARGETS := $(patsubst %,docker-%, $(TARGETS)) .PHONY: $(TARGETS) $(DOCKER_TARGETS) -DOCKERFILE_DEVEL := $(CURDIR)/deployments/container/Dockerfile.devel +DOCKERFILE_DEVEL := "images/devel/Dockerfile" +K8S_TEST_INFRA := "https://github.com/NVIDIA/k8s-test-infra.git" GOOS ?= linux ifeq ($(VERSION),) @@ -140,7 +141,7 @@ generate-clientset: .remove-clientset .remove-deepcopy .remove-crds .remove-clientset: rm -rf $(CURDIR)/$(PKG_BASE)/clientset -build-image: $(DOCKERFILE_DEVEL) +build-image: $(DOCKER) build \ --progress=plain \ --build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \ @@ -150,7 +151,7 @@ build-image: $(DOCKERFILE_DEVEL) --build-arg MOQ_VERSION="$(MOQ_VERSION)" \ --tag $(BUILDIMAGE) \ -f $(DOCKERFILE_DEVEL) \ - . + $(K8S_TEST_INFRA) $(DOCKER_TARGETS): docker-%: @echo "Running 'make $(*)' in container image $(BUILDIMAGE)" diff --git a/deployments/container/Dockerfile.devel b/deployments/container/Dockerfile.devel deleted file mode 100644 index 1f248da1..00000000 --- a/deployments/container/Dockerfile.devel +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -ARG GOLANG_VERSION=x.x.x -FROM golang:${GOLANG_VERSION} - -ARG CLIENT_GEN_VERSION=v0.26.1 -ARG CONTROLLER_GEN_VERSION=v0.9.2 -ARG GOLANGCI_LINT_VERSION=v1.52.0 -ARG MOQ_VERSION=v0.3.4 - -RUN go install sigs.k8s.io/controller-tools/cmd/controller-gen@${CONTROLLER_GEN_VERSION} \ - && go install k8s.io/code-generator/cmd/client-gen@${CLIENT_GEN_VERSION} \ - && go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} \ - && go install github.com/matryer/moq@${MOQ_VERSION} - -# We need to set the /work directory as a safe directory. -# This allows git commands to run in the container. -RUN git config --file=/.gitconfig --add safe.directory /work