Skip to content

Commit

Permalink
Rename POC tktpoto to opc
Browse files Browse the repository at this point in the history
Signed-off-by: Chmouel Boudjnah <[email protected]>
  • Loading branch information
chmouel committed Sep 26, 2022
1 parent 2b8ec87 commit 7532575
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 78 deletions.
100 changes: 25 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,92 +1,42 @@
Proof of concept of a single binary including pac and tkn functionalities
# OPC - A CLI for OpenShift Pipeline

Usage: `go build -o tktpoto`
The OPC project merge multiple upstream CLI and specific cli features for
OpenShift Pipelines.

```
$ ./tktpoto
CLI to manage Openshift Pipelines resources
Usage:
tkn [flags]
tkn [command]
Available Commands:
bundle Manage Tekton Bundles
chain Manage Chains
clustertask Manage ClusterTasks
clustertriggerbinding Manage ClusterTriggerBindings
eventlistener Manage EventListeners
hub Interact with tekton hub
pac Manage Pipelines as Code resources
pipeline Manage pipelines
pipelinerun Manage PipelineRuns
resource Manage pipeline resources
task Manage Tasks
taskrun Manage TaskRuns
triggerbinding Manage TriggerBindings
triggertemplate Manage TriggerTemplates
Other Commands:
completion Prints shell completion scripts
version Prints version information
Available Plugins:
watch
Flags:
-h, --help help for tkn
Use "tkn [command] --help" for more information about a command.
```
It contains :

```
$ ./tktpoto pac --help
Manage your Pipelines as Code installation and resources
See https://pipelinesascode.com for more details
Usage:
tkn pac [command]
Available Commands:
bootstrap Bootstrap Pipelines as Code.
completion Prints shell completion scripts
create Create Pipelines as Code resources
delete Delete Pipelines as Code resources
describe Describe a repository
generate Generate PipelineRun
list List Pipelines as Code Repository
logs Display the PipelineRun logs from a Repository
resolve Embed PipelineRun references as a single resource.
setup Setup provider app or webhook
version Print tkn pac version
Available Plugins:
watch
Flags:
-h, --help help for pac
-k, --kubeconfig string Path to the kubeconfig file to use for CLI requests (default: /Users/chmouel/.kube/config.kind) (default "/Users/chmouel/.kube/config.kind")
-n, --namespace string If present, the namespace scope for this CLI request
Use "tkn pac [command] --help" for more information about a command.
```
- TektonCD CLI (tkn) - <https://github.com/tektoncd/cli>
- Pipelines as Code CLI (tkn-pac) - <https://pipelinesascode.com/docs/guide/cli/>

## Build

Use the default target of the Makefile:

i.e:

`make`

## Usage

Same as tkn with the addition of the pac command which redirect to tkn-pac.

## Completions working
## Features

[![completion with tktpoto](https://asciinema.org/a/BbYcYRipEXPDPTG94cA56Otav.svg)](https://asciinema.org/a/BbYcYRipEXPDPTG94cA56Otav)
Support completion :

`opc completions [bash|zsh|...]`

### TODO

* need to figure out version, maybe add our own rootcommand and add tkncli/pac into it with our redefined version commands....
- Versioning are a bit all over the place

### NOTES

Only add 18mb :

```
% du $GOPATH/src/github.com/tektoncd/cli/bin/tkn
120M tkn
% du tktpoto
138M tktpoto
120M tkn
% du opc
138M opc
```
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/chmouel/tktpoto
module github.com/openshift-pipelines/opc

go 1.17
go 1.18

require (
github.com/fatih/color v1.13.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (
See https://pipelinesascode.com for more details`
pacShortdesc = "Manage Pipelines as Code resources"
tknShortDesc = `CLI to manage Openshift Pipelines resources`
binaryName = `tktpoto`
binaryName = `opc`
)

func iversion() *cobra.Command {
Expand Down

0 comments on commit 7532575

Please sign in to comment.