We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3bf19a commit 85c6d94Copy full SHA for 85c6d94
Makefile
@@ -0,0 +1,18 @@
1
+# Extract the Go version directly from go.mod (e.g., "1.23")
2
+GO_VERSION = $(shell awk '/^toolchain / {sub(/go/,"",$$2) ; print $$2}' go.mod)
3
+
4
+DOCKER_IMAGE = cni-outbound-test
5
6
+.PHONY: test
7
+test:
8
+ # Build the Docker image, passing GO_VERSION to the Docker build
9
+ docker build \
10
+ --build-arg GO_VERSION=$(GO_VERSION) \
11
+ -f Dockerfile.test \
12
+ -t $(DOCKER_IMAGE) .
13
+ # Run the container, which by default executes "go test -v ./..."
14
+ docker run --rm $(DOCKER_IMAGE)
15
16
+.PHONY: clean
17
+clean:
18
+ docker rmi $(DOCKER_IMAGE) || true
0 commit comments