File tree Expand file tree Collapse file tree 5 files changed +56
-5
lines changed Expand file tree Collapse file tree 5 files changed +56
-5
lines changed Original file line number Diff line number Diff line change 4545 - name : Get Golang version
4646 id : vars
4747 run : |
48- GOLANG_VERSION=$( grep "GOLANG_VERSION ?=" versions.mk )
48+ GOLANG_VERSION=$(./hack/golang-version.sh )
4949 echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION ?= }" >> $GITHUB_ENV
5050 - name : Install Go
5151 uses : actions/setup-go@v6
Original file line number Diff line number Diff line change @@ -103,7 +103,19 @@ CONTROLLER_GEN ?= controller-gen
103103.generate-api :
104104 $(CONTROLLER_GEN ) object object:headerFile=" hack/boilerplate.go.txt" paths=" ./api/..."
105105
106- $(DOCKER_TARGETS ) : docker-% :
106+ # Generate an image for containerized builds
107+ # Note: This image is local only
108+ .PHONY : .build-image
109+ .build-image : deployments/devel/Dockerfile
110+ if [ x" $( SKIP_IMAGE_BUILD) " = x" " ]; then \
111+ $(DOCKER ) build \
112+ --progress=plain \
113+ --tag $(BUILDIMAGE ) \
114+ -f $(^ ) \
115+ deployments/devel; \
116+ fi
117+
118+ $(DOCKER_TARGETS ) : docker-% : .build-image
107119 @echo " Running 'make $( * ) ' in container image $( BUILDIMAGE) "
108120 $(DOCKER ) run \
109121 --rm \
@@ -117,7 +129,7 @@ $(DOCKER_TARGETS): docker-%:
117129
118130# Start an interactive shell using the development image.
119131PHONY : .shell
120- .shell :
132+ .shell : .build-image
121133 $(DOCKER ) run \
122134 --rm \
123135 -ti \
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ # This Dockerfile is also used to define the golang version used in this project
16+ # This allows dependabot to manage this version in addition to other images.
17+ FROM golang:1.25.3
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Copyright 2025 NVIDIA CORPORATION
3+ #
4+ # Licensed under the Apache License, Version 2.0 (the "License");
5+ # you may not use this file except in compliance with the License.
6+ # You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ SCRIPTS_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " /../hack && pwd ) "
17+
18+ DOCKERFILE_ROOT=${SCRIPTS_DIR} /../deployments/devel
19+
20+ GOLANG_VERSION=$( grep -E " ^FROM golang:.*$" ${DOCKERFILE_ROOT} /Dockerfile | grep -oE " [0-9\.]+" )
21+
22+ echo $GOLANG_VERSION
Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ REGISTRY ?= nvcr.io/nvidia
2020
2121vVERSION := v$(VERSION:v%=% )
2222
23- GOLANG_VERSION ?= 1.25.3
23+ GOLANG_VERSION ?= $( shell ./hack/golang-version.sh)
2424
2525BUILDIMAGE_TAG ?= devel-go$(GOLANG_VERSION )
26- BUILDIMAGE ?= ghcr.io/nvidia/k8s-test-infra :$(BUILDIMAGE_TAG )
26+ BUILDIMAGE ?= $( NAME ) :$(BUILDIMAGE_TAG )
2727
2828GIT_COMMIT ?= $(shell git describe --match="" --dirty --long --always --abbrev=40 2> /dev/null || echo "")
You can’t perform that action at this time.
0 commit comments