Skip to content

Commit

Permalink
Add protobuf to make generate and ci preflight checks
Browse files Browse the repository at this point in the history
  • Loading branch information
hjiawei committed Jan 17, 2025
1 parent 59f7e97 commit d065e6b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 71 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,18 @@ check-dockerfiles:
check-language:
./hack/check-language.sh

protobuf:
$(MAKE) -C app-policy protobuf
$(MAKE) -C cni-plugin protobuf
$(MAKE) -C felix protobuf
$(MAKE) -C pod2daemon protobuf

generate:
$(MAKE) gen-semaphore-yaml
$(MAKE) protobuf
$(MAKE) -C api gen-files
$(MAKE) -C libcalico-go gen-files
$(MAKE) -C felix gen-files
$(MAKE) -C app-policy protobuf
$(MAKE) gen-manifests

gen-manifests: bin/helm
Expand Down
5 changes: 5 additions & 0 deletions cni-plugin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ $(WINDOWS_BIN)/calico.exe: $(SRC_FILES)
$(WINDOWS_BIN)/calico-ipam.exe: $(WINDOWS_BIN)/calico.exe
cp "$<" "$@"

protobuf pkg/dataplane/grpc/proto/cnibackend.pb.go: pkg/dataplane/grpc/proto/cnibackend.proto
$(DOCKER_RUN) -v $(CURDIR)/pkg/dataplane/grpc/proto:/proto:rw \
$(CALICO_BUILD) sh -c 'protoc --proto_path=/proto --go_out=/proto --go-grpc_out=/ --go_opt=paths=source_relative cnibackend.proto'
$(MAKE) fix-changed

# NOTE: WINDOWS_IMAGE_REQS must be defined with the requirements to build the windows
# image. These must be added as reqs to 'image-windows' (originally defined in
# lib.Makefile) on the specific package Makefile otherwise they are not correctly
Expand Down
93 changes: 23 additions & 70 deletions pod2daemon/proto/udsver.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d065e6b

Please sign in to comment.