From d214a53da4f80485aa8db038750de9d39d2a3275 Mon Sep 17 00:00:00 2001 From: hriships Date: Tue, 9 Apr 2019 10:43:58 +0530 Subject: [PATCH] Add's shortname for taskrun and pipelinerun 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. --- config/300-pipelinerun.yaml | 3 +++ config/300-taskrun.yaml | 3 +++ examples/README.md | 3 +++ 3 files changed, 9 insertions(+) diff --git a/config/300-pipelinerun.yaml b/config/300-pipelinerun.yaml index 4b416fe10f1..87fe1b7651a 100644 --- a/config/300-pipelinerun.yaml +++ b/config/300-pipelinerun.yaml @@ -23,6 +23,9 @@ spec: categories: - all - tekton-pipelines + shortNames: + - pr + - prs scope: Namespaced additionalPrinterColumns: - name: Type diff --git a/config/300-taskrun.yaml b/config/300-taskrun.yaml index f4edfb160df..d9bb6581763 100644 --- a/config/300-taskrun.yaml +++ b/config/300-taskrun.yaml @@ -23,6 +23,9 @@ spec: categories: - all - tekton-pipelines + shortNames: + - tr + - trs scope: Namespaced additionalPrinterColumns: - name: Succeeded diff --git a/examples/README.md b/examples/README.md index bbf217254a9..e7af6494a76 100644 --- a/examples/README.md +++ b/examples/README.md @@ -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.