-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Group Makefile targets #3192
Group Makefile targets #3192
Conversation
@Skarlso: This issue is currently awaiting triage. If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @Skarlso. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@shivi28 👋 :) These are the categories in the Makefile itself. I wanted to keep that as it is but I'm happy to reorder as needed. :) |
/ok-to-test |
It would be nice to make the categories look more like cluster-api, feel free to reorder as needed. Usage:
make <target>
Targets:
generate:
generate Run all generate-manifests-*, generate-go-deepcopy-* and generate-go-conversions-* targets
generate-manifests Run all generate-manifests-* targets
generate-manifests-core Generate manifests e.g. CRD, RBAC etc. for core
generate-manifests-kubeadm-bootstrap Generate manifests e.g. CRD, RBAC etc. for kubeadm bootstrap
generate-manifests-kubeadm-control-plane Generate manifests e.g. CRD, RBAC etc. for kubeadm control plane
generate-go-deepcopy Run all generate-go-deepcopy-* targets
generate-go-deepcopy-core Generate deepcopy go code for core
generate-go-deepcopy-kubeadm-bootstrap Generate deepcopy go code for kubeadm bootstrap
generate-go-deepcopy-kubeadm-control-plane Generate deepcopy go code for kubeadm control plane
generate-go-conversions Run all generate-go-conversions-* targets
generate-go-conversions-core Generate conversions go code for core
generate-go-conversions-kubeadm-bootstrap Generate conversions go code for kubeadm bootstrap
generate-go-conversions-kubeadm-control-plane Generate conversions go code for kubeadm control plane
diagrams Generate diagrams for *.plantuml files
lint and verify:
modules Run go mod tidy to ensure modules are up to date
lint Lint the codebase
lint-fix Lint the codebase and run auto-fixers if supported by the linter
apidiff Check for API differences
format-tiltfile Format the Tiltfile
verify Run all verify-* targets
verify-modules Verify go modules are up to date
verify-gen Verfiy go generated files are up to date
verify-conversions Verifies expected API conversion are in place
verify-boilerplate Verify boilerplate text exists in each file
verify-shellcheck Verify shell files
verify-tiltfile Verify Tiltfile format
verify-book-links Verify book links
build:
clusterctl Build the clusterctl binary
managers Run all manager-* targets
manager-core Build the core manager binary into the ./bin folder
manager-kubeadm-bootstrap Build the kubeadm bootstrap manager binary into the ./bin folder
manager-kubeadm-control-plane Build the kubeadm control plane manager binary into the ./bin folder
docker-build Run all docker-build-* targets
docker-build-core Build the docker image for core controller manager
docker-build-kubeadm-bootstrap Build the docker image for kubeadm bootstrap controller manager
docker-build-kubeadm-control-plane Build the docker image for kubeadm control plane controller manager
e2e-framework Builds the CAPI e2e framework
test:
test Run unit and integration tests
test-e2e Run the e2e tests
test-junit Run tests with verbose setting and generate a junit report
test-cover Run tests with code coverage and code generate reports
test-verbose Run tests with verbose settings
serve-book Build and serve the book with live-reloading enabled
kind-cluster Create a new kind cluster designed for testing with Tilt
docker-build-e2e Rebuild all Cluster API provider images to be used in the e2e tests
release:
release Build and push container images using the latest git tag for the commit
release-manifests Build the manifests to publish with a release
release-manifests-dev Build the development manifests and copies them in the release folder
release-binaries Build the binaries to publish with a release
release-staging Build and push container images to the staging bucket
release-staging-nightly Tag and push container images to the staging bucket. Example image tag: cluster-api-controller:nightly_main_20210121
release-alias-tag Add the release alias tag to the last build tag
docker-build-all Build all the architecture docker images
docker-push Push the docker images
docker-push-all Push all the architecture docker images
docker-push-manifest-core Push the multiarch manifest for the core docker images
docker-push-manifest-kubeadm-bootstrap Push the multiarch manifest for the the kubeadm bootstrap docker images
docker-push-manifest-kubeadm-control-plane Push the multiarch manifest for the the kubeadm control plane docker images
clean:
clean Remove all generated files
clean-bin Remove all generated binaries
clean-book Remove all generated GitBook files
clean-release Remove the release folder
clean-release-git Restores the git files usually modified during a release
clean-generated-conversions Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1alpha4"
hack/tools:
controller-gen Build a local copy of controller-gen
conversion-gen Build a local copy of conversion-gen
conversion-verifier Build a local copy of conversion-verifier
gotestsum Build a local copy of gotestsum
go-apidiff Build a local copy of apidiff
golangci-lint Build a local copy of golangci-lint
envsubst Build a local copy of envsubst
kustomize Build a local copy of kustomize
setup-envtest Build a local copy of setup-envtest
tilt-prepare Build a local copy of tilt-prepare
kpromo Build a local copy of kpromo
Same category names, like instead of binaries --> build |
@sedefsavas how about this:
|
61f8cd9
to
6655036
Compare
Makefile
Outdated
echo "go module files are out of date"; exit 1; \ | ||
fi | ||
.PHONY: docker-build | ||
docker-build: docker-pull-prerequisites ## Build the docker image for controller-manager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can go under build category?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I was on the fence about it since it's docker build. 😂
Makefile
Outdated
echo verification of api conversions initiated | ||
$(CONVERSION_VERIFIER) | ||
.PHONY: docker-push | ||
docker-push: ## Push the docker image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can go under release category.
Makefile
Outdated
.PHONY: docker-build | ||
docker-build: docker-pull-prerequisites ## Build the docker image for controller-manager | ||
docker build --build-arg ARCH=$(ARCH) --build-arg LDFLAGS="$(LDFLAGS)" . -t $(CORE_CONTROLLER_IMG)-$(ARCH):$(TAG) | ||
##@ list and verify: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could combine with lint and add modules under it.
Makefile
Outdated
verify-boilerplate: | ||
-rm ./hack/tools/bin/*.sh | ||
./hack/verify-boilerplate.sh | ||
##@ tools: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need this IMO, everything under it has a suitable category.
I added some descriptions which where missing, therefore, they weren't in the help at all. That might have been maybe intentional? I can remove them if desired. Further,
|
2142ba9
to
91a305b
Compare
/retest |
I just changed the makefile ordering, I don't think I messed with the tests. Unless, I accidentally deleted a make target maybe? |
Yaaay, seems like the tests passed. |
Hey @Skarlso Thanks for the PR. I have one suggestion, can we sort the categories command alphabetically. Wdyt?
can be re-written as
Same we can do with others also. |
And once all changes are done, we can squash all the commits to single comment |
@shivi28 sure, no problem. |
309ac74
to
ce2ba25
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sedefsavas The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
A nicer Makefile help output:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #3188
Special notes for your reviewer:
Checklist:
Release note: