-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,026 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# TNB CLI | ||
|
||
If you want to use System-X services from your terminal without writing a test case you can use the `tnb` script. | ||
|
||
## Installation | ||
You'll need `jbang` installed and TNB build locally. Use command | ||
`jbang app install jbang/tnb.java` to register the `tnb` command globally. | ||
|
||
## Usage | ||
The `tnb` CLI uses groovy shell, so any groovy language features should be valid. | ||
|
||
You can see it in action in this demo: | ||
|
||
[![demo](demo.gif)](https://asciinema.org/a/585241) | ||
|
||
### Deploying System-X services | ||
To deploy a System-X service you can use the `deploy <System-X Classname>` command. | ||
By default the services are deployed locally, you can use the `--openshift` flag to deploy on OCP cluster you are currently logged in. | ||
|
||
Or use commands `setOpenshift` and `setLocal` to use OCP or local installation always. | ||
|
||
### Using deployed services | ||
After deploying the service you'll be prompted with the service name to use in shell. | ||
You can then use this name to use it as a normal System-X service. `<name>.validation().[TAB]` will help you. | ||
|
||
Services are undeployed by default after you close the `tnb` session, or use the `undeploy` command. | ||
|
||
### Configuration | ||
The CLI uses `~/.tnb` directory for its configuration. `~/.tnb/init.groovy` file is executed on startup. You can use this to setup any properties, for example: | ||
|
||
```groovy | ||
System.setProperty('test.credentials.file', '~/credentials.yaml') | ||
System.setProperty('openshift.kubeconfig', '~/kubeconfig.yaml') | ||
``` | ||
|
||
#### Credentials | ||
In a case where a service needs credentials that can't be found then you'll be asked to provide the credentials. | ||
These credentials are then stored in `~/.tnb/credentials/<id>.properties` and will be used for later use. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.