Commit Graph

12 Commits

Author SHA1 Message Date
Chris Suszynski f09e7164ce
Fold in knative.dev/client-pkg as a submodule (#1953)
* Move to the hack' script inflator

* Skip kn subpackage

* Move the lib/ to public pkg/ packages

* Introduce pkg submodule, remove the vendor dir

* Remove vendor references

* Use latest version of knative.dev/hack

* Publish dependent images properly

* Walkaround for knative-extensions/net-istio#1345

* Remove GOTOOLCHAIN in go.work

* Verify codegen use common funcs

* Import code from knative.dev/client-pkg

* Restore the default unit test runner

* Try knative/actions#223

* Restore the workflows

* Nit: simplify config package import
2024-09-03 13:49:11 +00:00
Murugappan Chetty af052088ca
remove hardcoded kn for usage and error (#1603)
* remove hardcoded kn for usage and error

* remove hardcoded kn for usage and error

* remove hardcoded kn for usage and error

* remove hardcoded kn for usage and error

* docs change
2022-02-17 02:07:13 -08:00
Paul Schweigert 569e027d98
Remove deprecated Hugo frontmatter generation for docs (#1563)
* removes deprecated hugo frontmatter generation

* changelog

* PR number

* remove emptyString
2022-01-10 08:40:59 -08:00
Roland Huß 490fe574cc
feat: Add plugin listing to "kn --help" (#929)
* feat: Add plugin listing to "kn --help"

This works on all levels. Test needs to be expanded still.

Fixes #266

* chore: Fix test

* Add test and ported #910 over.

* changelog update

* fix test

* Fix test

* fix integration tests

* fix test

* chore: Add some explanatory comments

* fix test
2020-07-14 13:38:33 -07:00
Roland Huß c7426459be
Refactor main flow and introduce explicit plugin and config handling (#877)
* Refactor main flow, plugin and configuration handling

* The plugin handling has been moved out of the `KnDefaultCommand` constructor where it was executed as a side-effect. The original code from `kubectl` suffers from the same issue that plugin handling is not a top-level concern but was very likely introduced as an after-thought. Instead, the plugin handling is done now by a `PluginManager` which is explicitly called in `main()`.
* Configuration and bootstrap option handling is centralized in the package `option`. After the bootstrap happened, the content of the configuration file, as well as any other global configuration, can be obtained from methods on  `config.GlobalConfig`. Also, all flag handling is delegated to cobra so that no own parsing is needed.
* Many of the logic in `pkg/kn/commands/plugin` for plugin management has been moved up to `pkg/kn/plugin` as this code is not only relevant for `plugin list` but also for the bootstrap process.

* fix: invalid subcommands will lead to a proper error message

* Update pkg/kn/config/types.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* Update pkg/kn/plugin/manager.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* Update hack/generate-docs.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* Update hack/generate-docs.go

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* chore: Add missing links

* chore: recert to shas in links in developer guide for now.

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
2020-06-15 09:15:24 -07:00
Matt Moore c0e5cd1d8d
golang format tools (#711)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)`
  `goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party)`
/assign maximilien rhuss
/cc maximilien rhuss
2020-03-09 07:45:28 -07:00
Roland Huß 56e14653c5
chore: Add option to generate frontmatter to gendocs. (#680)
* chore: Cleaned up README

This is just a start for reorganizing the client side documentation.

* chore: Add option to generate frontmatter to gendocs.

This is needed for latter inclusion in knative.dev. Related to #639.
2020-03-09 04:04:28 -07:00
Naomi Seyfer 25c726453e Update serving dependency to 0.8; change all import paths (#368)
* Update serving to 0.8. Try building.

* Find the right serving version

* Change our own import path to knative.dev to match

* Remove dependency on old version of client

* Update yaml template

* Add sleep to test to deal with race

* fix merge conflict

* Update vendor modules
2019-08-15 18:09:08 -07:00
Navid Shaikh 65f1c081ee Add kn revision delete command (#207)
* Adds kn revision delete command

* Adds unit tests for revision delete command

* Adds integration tests for revision delete command

 Added revision delete command tests in new workflow namely
 TestRevisionWorkflow.

* Removes extra line and renames an import alias

* Adds 10 seconds sleep between service create and revision delete

 Also adds check for 'No resources found' while grabbing revision name.

* Clean up imports

* Removes the pause after service create

* Updates testing output strings in unit and e2e

* Updates post goimports on hack and test dirs
2019-06-28 10:21:08 -07:00
dr.max 0800d7c4d3 Regroups code to use subpackages. Finishes issue #66 (#145)
Creates four subpackages for now:

1. kn/commands - inludes types.go for common
   struct and other common files and misc commands
2. kn/commands/service - all 'kn service *' commands
3. kn/commands/revision - all 'kn revision *' commands
4. kn/core - contains the root.go and other top level
   for code and testing
5. refactors:
   a. split .../commons/human_readable_flags.go into three
   b. modifies the HumanReadableFlags.ToPrinter to get pass
      a function that sets the columns and fields

Had to refactor all tests to avoid cycles.
2019-06-05 16:30:38 -07:00
Roland Huß bfd5b56c3f chore: Streamlined build.sh (#136)
* chore: Streamlined build.sh

* Merged generate-docs.sh into build.sh
* Split up into smaller functions
* Added serving dependency version to 'kn version' command

Not sure whether the latter is really useful (showing the serving dependency)
as this is might get confused with the knative version
installed on the cluster.

* chore: Fixed indentation
2019-05-28 06:08:31 -07:00
dr.max 95808278d4 Adds Cobra generated docs and means to generate them and first cut of other docs (#93)
* Added Cobra generated docs and ways to generate them

* Adds docs/README.md and first user's guide for Kn
2019-05-06 17:39:36 -07:00