-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰: sync kb binary from source code for docs #3520
馃悰: sync kb binary from source code for docs #3520
Conversation
/test pull-kubebuilder-e2e-k8s-1-26-0 |
Makefile
Outdated
@@ -63,18 +63,14 @@ install: build ## Build and install the binary with the current source code. Use | |||
##@ Development | |||
|
|||
.PHONY: generate | |||
generate: generate-testdata generate-docs ## Update/generate all mock data. You should run this commands to update the mock data after your changes. | |||
generate: generate-testdata check-docs ## Update/generate all mock data. You should run this commands to update the mock data after your changes. |
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.
The target generate has the purpose to generate only and not check
The check is used in the CI only for we ensure that the docs were properly generate.
IMO it should work at the same way of generate-testdata and check-testdata.
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.
Sounds good!
I just follow your idea and make the corresponding updates:
- Create a new
hack/docs/generate.sh
that builds thekb executable
from source code and run the go code to re-generate docs samples - Modify the target
generate-docs
to callhack/docs/generate.sh
- Modify the target
check-docs
to drop unnecessary import and callhack/docs/generate.sh
Let me know how you'd like this or if I'm understanding wrong :)
1e75efd
to
dfe3ab8
Compare
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.
Great work.
I am moving with this one because the issue faced in the preview has no relation and it is sorted in another PR.
Thank you.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, Kavinjsir 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 |
68abac1
into
kubernetes-sigs:master
fix: sync kb binary from source code for docs
fix: sync kb binary from source code for docs
feat: get data feat: add change feat: remove log feat: add e2e test build(deps): bump golang.org/x/tools from 0.11.0 to 0.12.0 Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.11.0 to 0.12.0. - [Release notes](https://github.com/golang/tools/releases) - [Commits](golang/tools@v0.11.0...v0.12.0) --- updated-dependencies: - dependency-name: golang.org/x/tools dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> chore(docs): change folder pkg to internal/controller in the migration guide fix: ensure external plugin can scaffold files in new dirs :seedling: Image name edge cases covered (kubernetes-sigs#3514) imagename edge case cover :seedling: logs info updated (kubernetes-sigs#3512) logs info updated :bug: fix doc preview 馃悰: sync kb binary from source code for docs (kubernetes-sigs#3520) fix: sync kb binary from source code for docs :bug: fix typos in scaffolded makefiles :book: fix escaped html in markdown code segments :bug: (go/v4) fix makefile target to build images ensuring its single responsability refactor: externalize cfg :bug: (deployimage): fix e2e tests which are using go/v3 which is deprecated. Ensure that we are using the go/v4 ensure that we call go tidy when we generate sample docs :sparkles: (Kustomize/v2, go/v4): upgrade controller-tools from 0.12.0 to 0.13.0 (kubernetes-sigs#3561) (go/v4): Upgrade controller-tools from 0.12.0 to v0.13.0 :sparkles: improve logs from alpha command generate :bug: (deployimage/v1-beta1): fix scaffold with multigroup and add optional plugins to multigroup sample to validate changes :bug: change deprecated warning to yellow feat: remove quota fix: add space fix: change kind Update test/e2e/alphagenerate/generate_test.go Co-authored-by: Tony (TianYi) <kavinjsir@gmail.com>
Description
This PR aims to ensure that the
Kubebuilder binary
used for docs generation is built from the source code so that the docs can be updated corresponding to the latest code change.hack/docs/generate.sh
that builds the kb executable from source code and run the go code to re-generate docs samplesgenerate-docs
to callhack/docs/generate.sh
check-docs
to drop unnecessary import and callhack/docs/generate.sh
/tmp/kubebuilder/bin/kubebuilder
which is generated bybuild_kb
(instead of the default kb from user's os env).Motivation:
Partially resolve #3435
See comments: