Skip to content

Commit

Permalink
Add's shortname for taskrun and pipelinerun
Browse files Browse the repository at this point in the history
During tekton pipeline development, a developer often queries
`taskruns` and `pipelineruns`.

This patch adds shortnames to `taskruns` and `pipelineruns` CR's.
So it could improve CLI experience while querying `taskruns` and
`pipelineruns` resources.
  • Loading branch information
hrishin authored and tekton-robot committed Apr 13, 2019
1 parent 9f52dad commit 66847a6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/300-pipelinerun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ spec:
categories:
- all
- tekton-pipelines
shortNames:
- pr
- prs
scope: Namespaced
additionalPrinterColumns:
- JSONPath: .status.conditions[?(@.type=="Succeeded")].status
Expand Down
3 changes: 3 additions & 0 deletions config/300-taskrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ spec:
categories:
- all
- tekton-pipelines
shortNames:
- tr
- trs
scope: Namespaced
additionalPrinterColumns:
- name: Succeeded
Expand Down
3 changes: 3 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ test-git-ref Succeeded True 2019-02-11T21:21:02Z
test-git-tag Succeeded True 2019-02-11T21:21:02Z
```


```shell
$ kubectl get pipelineruns -o=custom-columns-file=./test/columns.txt
NAME TYPE STATUS START
demo-pipeline-run-1 Succeeded True 2019-02-11T21:21:03Z
output-pipeline-run Succeeded True 2019-02-11T21:35:43Z
```

You can also use `kubectl get tr` or `kubectl get pr` to query all `taskruns` or `pipelineruns` respectively.

0 comments on commit 66847a6

Please sign in to comment.