mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 00:08:11 +00:00
Use test-infra devel image
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
This commit is contained in:
parent
03cbf9c6cd
commit
88debb8e34
31
Makefile
31
Makefile
@ -100,31 +100,12 @@ coverage: test
|
|||||||
generate:
|
generate:
|
||||||
go generate $(MODULE)/...
|
go generate $(MODULE)/...
|
||||||
|
|
||||||
# Generate an image for containerized builds
|
$(DOCKER_TARGETS): docker-%:
|
||||||
# Note: This image is local only
|
@echo "Running 'make $(*)' in container image $(BUILDIMAGE)"
|
||||||
.PHONY: .build-image .pull-build-image .push-build-image
|
|
||||||
.build-image: docker/Dockerfile.devel
|
|
||||||
if [ x"$(SKIP_IMAGE_BUILD)" = x"" ]; then \
|
|
||||||
$(DOCKER) build \
|
|
||||||
--progress=plain \
|
|
||||||
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
|
|
||||||
--tag $(BUILDIMAGE) \
|
|
||||||
-f $(^) \
|
|
||||||
docker; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
.pull-build-image:
|
|
||||||
$(DOCKER) pull $(BUILDIMAGE)
|
|
||||||
|
|
||||||
.push-build-image:
|
|
||||||
$(DOCKER) push $(BUILDIMAGE)
|
|
||||||
|
|
||||||
$(DOCKER_TARGETS): docker-%: .build-image
|
|
||||||
@echo "Running 'make $(*)' in docker container $(BUILDIMAGE)"
|
|
||||||
$(DOCKER) run \
|
$(DOCKER) run \
|
||||||
--rm \
|
--rm \
|
||||||
-e GOCACHE=/tmp/.cache \
|
-e GOCACHE=/tmp/.cache/go \
|
||||||
-e GOLANGCI_LINT_CACHE=/tmp/.cache \
|
-e GOMODCACHE=/tmp/.cache/gomod \
|
||||||
-v $(PWD):/work \
|
-v $(PWD):/work \
|
||||||
-w /work \
|
-w /work \
|
||||||
--user $$(id -u):$$(id -g) \
|
--user $$(id -u):$$(id -g) \
|
||||||
@ -137,8 +118,8 @@ PHONY: .shell
|
|||||||
$(DOCKER) run \
|
$(DOCKER) run \
|
||||||
--rm \
|
--rm \
|
||||||
-ti \
|
-ti \
|
||||||
-e GOCACHE=/tmp/.cache \
|
-e GOCACHE=/tmp/.cache/go \
|
||||||
-e GOLANGCI_LINT_CACHE=/tmp/.cache \
|
-e GOMODCACHE=/tmp/.cache/gomod \
|
||||||
-v $(PWD):/work \
|
-v $(PWD):/work \
|
||||||
-w /work \
|
-w /work \
|
||||||
--user $$(id -u):$$(id -g) \
|
--user $$(id -u):$$(id -g) \
|
||||||
|
@ -33,6 +33,9 @@ LIBNVIDIA_CONTAINER0_VERSION := 0.10.0+jetpack
|
|||||||
CUDA_VERSION := 12.3.1
|
CUDA_VERSION := 12.3.1
|
||||||
GOLANG_VERSION := 1.20.5
|
GOLANG_VERSION := 1.20.5
|
||||||
|
|
||||||
|
BUILDIMAGE_TAG ?= devel-go$(GOLANG_VERSION)
|
||||||
|
BUILDIMAGE ?= ghcr.io/nvidia/k8s-test-infra:$(BUILDIMAGE_TAG)
|
||||||
|
|
||||||
GIT_COMMIT ?= $(shell git describe --match="" --dirty --long --always --abbrev=40 2> /dev/null || echo "")
|
GIT_COMMIT ?= $(shell git describe --match="" --dirty --long --always --abbrev=40 2> /dev/null || echo "")
|
||||||
GIT_COMMIT_SHORT ?= $(shell git rev-parse --short HEAD 2> /dev/null || echo "")
|
GIT_COMMIT_SHORT ?= $(shell git rev-parse --short HEAD 2> /dev/null || echo "")
|
||||||
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2> /dev/null || echo "${GIT_COMMIT}")
|
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2> /dev/null || echo "${GIT_COMMIT}")
|
||||||
|
Loading…
Reference in New Issue
Block a user