Skip to content

Commit d336000

Browse files
committed
chore: cleanup rebase
1 parent 16b8c5b commit d336000

File tree

8 files changed

+33
-30
lines changed

8 files changed

+33
-30
lines changed

.github/workflows/codeql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
contents: read
3333
security-events: write
3434
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@v4
3537
- name: Setup go
3638
uses: actions/setup-go@v5
3739
with:
3840
go-version-file: go.mod
39-
- name: Checkout repository
40-
uses: actions/checkout@v4
4141
- name: Initialize CodeQL
4242
uses: github/codeql-action/init@v3
4343
with:

.github/workflows/golangci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919
name: Lint
2020
runs-on: ${{ matrix.os }}
2121
steps:
22-
- uses: actions/setup-go@v5
23-
with:
24-
go-version-file: go.mod
2522
- uses: actions/checkout@v4
2623
with:
2724
fetch-depth: 0
25+
- uses: actions/setup-go@v5
26+
with:
27+
go-version-file: go.mod
2828
- name: golangci-lint
2929
uses: golangci/golangci-lint-action@v6
3030
with:

Makefile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ CNI_IMAGE_INFO_FILE = azure-cni-$(CNI_VERSION).txt
107107
CNS_IMAGE_INFO_FILE = azure-cns-$(CNS_VERSION).txt
108108
NPM_IMAGE_INFO_FILE = azure-npm-$(NPM_VERSION).txt
109109

110+
#Tools paths
111+
TOOLS_GO_MOD = $(REPO_ROOT)/tools.go.mod
112+
110113
# Default target
111114
all-binaries-platforms: ## Make all platform binaries
112115
@for goos in "$(GOOSES)"; do \
@@ -846,7 +849,7 @@ clean: ## Clean build artifacts.
846849

847850
LINT_PKG ?= .
848851

849-
GOLANGCI_LINT = go tool golangci-lint
852+
GOLANGCI_LINT = go tool -modfile=$(TOOLS_GO_MOD) golangci-lint
850853

851854
lint: ## Fast lint vs default branch showing only new issues.
852855
GOGC=20 $(GOLANGCI_LINT) run --timeout 25m -v $(LINT_PKG)/...
@@ -882,7 +885,7 @@ test-all: test-azure-ipam test-azure-ip-masq-merger test-azure-iptables-monitor
882885

883886
test-main:
884887
go test -mod=readonly -buildvcs=false -tags "unit" --skip 'TestE2E*' -race -covermode atomic -coverprofile=coverage-main.out $(COVER_PKG)/...
885-
go tool cover -func=coverage-main.out
888+
go tool -modfile=$(TOOLS_GO_MOD) cover -func=coverage-main.out
886889

887890
test-integration: ## run all integration tests.
888891
AZURE_IPAM_VERSION=$(AZURE_IPAM_VERSION) \
@@ -913,13 +916,13 @@ test-extended-cyclonus: ## run the cyclonus test for npm.
913916
cd ..
914917

915918
test-azure-ipam: ## run the unit test for azure-ipam
916-
cd $(AZURE_IPAM_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ipam.out && go tool cover -func=../coverage-azure-ipam.out
919+
cd $(AZURE_IPAM_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ipam.out && go tool cover -modfile=$(TOOLS_GO_MOD) -func=../coverage-azure-ipam.out
917920

918921
test-azure-ip-masq-merger: ## run the unit test for azure-ip-masq-merger
919-
cd $(AZURE_IP_MASQ_MERGER_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ip-masq-merger.out && go tool cover -func=../coverage-azure-ip-masq-merger.out
922+
cd $(AZURE_IP_MASQ_MERGER_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ip-masq-merger.out && go tool cover -modfile=$(TOOLS_GO_MOD) -func=../coverage-azure-ip-masq-merger.out
920923

921924
test-azure-iptables-monitor: ## run the unit test for azure-iptables-monitor
922-
cd $(AZURE_IPTABLES_MONITOR_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-iptables-monitor.out && go tool cover -func=../coverage-azure-iptables-monitor.out
925+
cd $(AZURE_IPTABLES_MONITOR_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-iptables-monitor.out && go tool cover -modfile=$(TOOLS_GO_MOD) -func=../coverage-azure-iptables-monitor.out
923926

924927
kind:
925928
kind create cluster --config ./test/kind/kind.yaml
@@ -961,7 +964,7 @@ setup: install-hooks gitconfig ## performs common required repo setup
961964
tools: renderkit
962965

963966
renderkit: ## Install renderkit for rendering Dockerfile templates
964-
@go install -modfile=tools.go.mod github.com/orellazri/renderkit
967+
@go install -modfile=$(TOOLS_GO_MOD) github.com/orellazri/renderkit
965968

966969
##@ Help
967970

crd/clustersubnetstate/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
.DEFAULT_GOAL = all
22

33
REPO_ROOT = $(shell git rev-parse --show-toplevel)
4-
CONTROLLER_GEN = go tool controller-gen
4+
CONTROLLER_GEN = go tool -modfile=tools.go.mod controller-gen
55

66
all: generate manifests
77

8-
generate:
8+
generate:
99
$(CONTROLLER_GEN) object paths="./..."
1010

1111
.PHONY: manifests
12-
manifests:
12+
manifests:
1313
mkdir -p manifests
1414
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=manifests/

crd/multitenancy/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
.DEFAULT_GOAL = all
1+
.DEFAULT_GOAL = all
22

33
REPO_ROOT = $(shell git rev-parse --show-toplevel)
4-
CONTROLLER_GEN = go tool controller-gen
4+
CONTROLLER_GEN = go tool -modfile=tools.go.mod controller-gen
55

66
all: generate manifests
77

8-
generate:
8+
generate:
99
$(CONTROLLER_GEN) object paths="./..."
1010

1111
.PHONY: manifests
12-
manifests:
12+
manifests:
1313
mkdir -p manifests
1414
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=manifests/
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
.DEFAULT_GOAL: all
22

33
REPO_ROOT = $(shell git rev-parse --show-toplevel)
4-
CONTROLLER_GEN = go tool controller-gen
4+
CONTROLLER_GEN = go tool -modfile=tools.go.mod controller-gen
55

6-
all: generate manifests
6+
all: generate manifests
77

8-
generate:
8+
generate:
99
$(CONTROLLER_GEN) object paths="./..."
1010

1111
.PHONY: manifests
12-
manifests:
12+
manifests:
1313
mkdir -p manifests
1414
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=manifests/

crd/nodenetworkconfig/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
.DEFAULT_GOAL = all
1+
.DEFAULT_GOAL = all
22

33
REPO_ROOT = $(shell git rev-parse --show-toplevel)
4-
CONTROLLER_GEN = go tool controller-gen
4+
CONTROLLER_GEN = go tool -modfile=tools.go.mod controller-gen
55

66
all: generate manifests
77

8-
generate:
8+
generate:
99
$(CONTROLLER_GEN) object paths="./..."
1010

1111
.PHONY: manifests
12-
manifests:
12+
manifests:
1313
mkdir -p manifests
1414
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=manifests/
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
.DEFAULT_GOAL = all
1+
.DEFAULT_GOAL = all
22

33
REPO_ROOT = $(shell git rev-parse --show-toplevel)
4-
CONTROLLER_GEN = go tool controller-gen
4+
CONTROLLER_GEN = go tool -modfile=tools.go.mod controller-gen
55

66
all: generate manifests
77

8-
generate:
8+
generate:
99
$(CONTROLLER_GEN) object paths="./..."
1010

1111
.PHONY: manifests
12-
manifests:
12+
manifests:
1313
mkdir -p manifests
1414
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=manifests/

0 commit comments

Comments
 (0)