Skip to content

Commit 1fcb8a8

Browse files
committed
chore: cleanup rebase
1 parent 1c9c8ba commit 1fcb8a8

File tree

12 files changed

+41
-34
lines changed

12 files changed

+41
-34
lines changed

.github/workflows/baseimages.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ jobs:
1818
- uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
21-
- name: Set up Go
22-
uses: actions/setup-go@v5
21+
- uses: actions/setup-go@v5
2322
with:
24-
go-version: '1.23'
23+
go-version-file: go.mod
24+
- name: go debug
25+
run: |
26+
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
2527
- name: Render Dockerfiles
2628
run: make dockerfiles
2729
- name: Fail if base images are outdated

.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
@@ -39,12 +39,12 @@ jobs:
3939
needs: generate
4040
runs-on: ${{ matrix.os }}
4141
steps:
42-
- uses: actions/setup-go@v5
43-
with:
44-
go-version-file: go.mod
4542
- uses: actions/checkout@v4
4643
with:
4744
fetch-depth: 0
45+
- uses: actions/setup-go@v5
46+
with:
47+
go-version-file: go.mod
4848
- name: Download generated code
4949
uses: actions/download-artifact@v4
5050
with:

Makefile

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

114+
#Tools paths
115+
TOOLS_GO_MOD = $(REPO_ROOT)/tools.go.mod
116+
114117
# Default target
115118
all-binaries-platforms: ## Make all platform binaries
116119
@for goos in "$(GOOSES)"; do \
@@ -867,7 +870,7 @@ clean: ## Clean build artifacts.
867870

868871
LINT_PKG ?= .
869872

870-
GOLANGCI_LINT = go tool golangci-lint
873+
GOLANGCI_LINT = go tool -modfile=$(TOOLS_GO_MOD) golangci-lint
871874

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

904907
test-main:
905908
go test -mod=readonly -buildvcs=false -tags "unit" --skip 'TestE2E*' -race -covermode atomic -coverprofile=coverage-main.out $(COVER_PKG)/...
906-
go tool cover -func=coverage-main.out
909+
go tool -modfile=$(TOOLS_GO_MOD) cover -func=coverage-main.out
907910

908911
test-integration: ## run all integration tests.
909912
AZURE_IPAM_VERSION=$(AZURE_IPAM_VERSION) \
@@ -934,13 +937,13 @@ test-extended-cyclonus: ## run the cyclonus test for npm.
934937
cd ..
935938

936939
test-azure-ipam: ## run the unit test for azure-ipam
937-
cd $(AZURE_IPAM_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ipam.out && go tool cover -func=../coverage-azure-ipam.out
940+
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
938941

939942
test-azure-ip-masq-merger: ## run the unit test for azure-ip-masq-merger
940-
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
943+
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
941944

942945
test-azure-iptables-monitor: ## run the unit test for azure-iptables-monitor
943-
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
946+
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
944947

945948
kind:
946949
kind create cluster --config ./test/kind/kind.yaml
@@ -982,7 +985,7 @@ setup: install-hooks gitconfig ## performs common required repo setup
982985
tools: renderkit
983986

984987
renderkit: ## Install renderkit for rendering Dockerfile templates
985-
@go install -modfile=tools.go.mod github.com/orellazri/renderkit
988+
@go install -modfile=$(TOOLS_GO_MOD) github.com/orellazri/renderkit
986989

987990
##@ Help
988991

build/images.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ print:
2626
@echo ${WIN_HPC_PIN}
2727

2828
render:
29+
@echo "${GOPATH}"
2930
${GOPATH}/bin/renderkit -f ${SRC} --ds env:// > ${DEST}
3031
${GOPATH}/bin/renderkit -f ${SRC_PIPE} --ds env:// > ${DEST_PIPE}

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=$(REPO_ROOT)/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=$(REPO_ROOT)/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=$(REPO_ROOT)/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=$(REPO_ROOT)/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=$(REPO_ROOT)/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)