redhat-scholars / tekton-tutorial

Get started with Tekton Pipelines :smiley_cat: for https://dn.dev/master. Learn from basics to advanced
https://redhat-scholars.github.io/tekton-tutorial
Apache License 2.0
95 stars 94 forks source link

usability enhancement: tkn tr logs -f -a $(`kubectl get pod -l tekton.dev/task=git-clone -o name`) #16

Closed burrsutter closed 4 years ago

burrsutter commented 4 years ago

There are several places where the end-user has to use the name/id of the pod that was launched.
https://redhat-developer-demos.github.io/tekton-tutorial/tekton-tutorial/workspaces.html#ws-use-pvc-git-clone "tkn tr logs -f -a git-clone-dpd7t" and this line could be replaced with something that is copy & paste friendly like tkn tr logs -f -a $(kubectl get pod -l tekton.dev/task=git-clone -o name)

right now, if the end-user does the copy the command will fail because the pod name is different.

kameshsampath commented 4 years ago

Thats a great point, using something like this now:

TaskRun logs:

tkn tr logs -f -a $(tkn tr ls -n {chapter-namespace} | awk 'NR==2{print $1}')

PipelineRun logs:

tkn pr logs -f -a $(tkn pr ls -n {chapter-namespace} | awk 'NR==2{print $1}')

Closed via 04f3bb9