Skip to content

Commit

Permalink
Add more flags
Browse files Browse the repository at this point in the history
Signed-off-by: divyansh42 <[email protected]>
  • Loading branch information
divyansh42 committed Feb 19, 2025
1 parent 593bf24 commit c933e7e
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions teps/0157-enhance-results-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,36 @@ This proposal introduces a new CLI tool, `tkn-results`, designed to simplify int

#### Configuration

The configuration will allow users to provide the following options:
- **API_URL**: The URL of the Tekton Results API.
- **Token**: The authentication token for secure API access.
- **API Path**: The specific API endpoint path.

These values can be automatically fetched and will have default values when possible.

```sh
tkn-results config set # Set authentication and configuration parameters
tkn-results config reset # Reset the configuration to default values
tkn-results config view # View the current configuration
```

##### **Additional Flags**
- `--kubeconfig`: Provide a custom kubeconfig file instead of using the default one (default: $HOME/.kube/config).
- `--context`: Specify a Kubernetes context instead of the default.
- `--no-prompt`: Apply default values without prompting the user for input.

#### Fetching PipelineRuns and TaskRuns

```sh
tkn-results pr ls -n <namespace> # Get list of PipelineRuns in a namespace
tkn-results tr ls -n <namespace> # Get list of TaskRuns in a namespace
tkn-results pr ls # Get list of PipelineRuns in a namespace
tkn-results tr ls # Get list of TaskRuns in a namespace
```
##### **Additional Flags**
- `--all-namespace`: List PipelineRuns from all namespaces.
- `--label`: A selector (label query) to filter results.

##### **Global Flags**
- `--namespace`: Specify the namespace to use (default: from $KUBECONFIG).

#### Describing Runs

Expand All @@ -113,6 +133,8 @@ tkn-results tr logs <tr-name> -n <namespace> # Fetch logs of a specific TaskRun

### Architecture

- The CLI will fetch the API URL and authentication token from the user's kubeconfig file when possible, ensuring seamless authentication without manual configuration.

- The CLI will interact directly with `Tekton Results API` to fetch records.

- Retrieved records will be parsed and structured as `PipelineRun` or `TaskRun` objects, and their details will be formatted and displayed on the CLI.
Expand Down

0 comments on commit c933e7e

Please sign in to comment.