Skip to content

Commit

Permalink
Format markdown
Browse files Browse the repository at this point in the history
Produced via: `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)`
  • Loading branch information
mattmoor-sockpuppet authored and knative-prow-robot committed Dec 30, 2018
1 parent 68e8972 commit a50349c
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions test/logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
- [How to follow PipelineRun logs?](#pipelinerun)
- [How to follow TaskRun logs?](#taskrun)

`Pipelinerun` object creates taskruns depending on the definition of underlying `Pipeline` definition.
Each `TaskRun` object creates Kubernetes Pod and all the steps are translated into init containers.
`Pipelinerun` object creates taskruns depending on the definition of underlying
`Pipeline` definition. Each `TaskRun` object creates Kubernetes Pod and all the
steps are translated into init containers.

There is a "gotcha" about tailing logs for init container. Logs cannot be retrieved from pod that has been shut down for a while. In this case tailing logs will return error `Unable to retrieve container logs`.
There is a "gotcha" about tailing logs for init container. Logs cannot be
retrieved from pod that has been shut down for a while. In this case tailing
logs will return error `Unable to retrieve container logs`.

```shell
go run test/logs/main.go [-n NAMESPACE] [-pr PIPELINERUN-NAME] / [-tr TASKRUN_NAME] [-f FILE-NAME]
Expand All @@ -21,19 +24,24 @@ go run test/logs/main.go [-n NAMESPACE] [-pr PIPELINERUN-NAME] / [-tr TASKRUN_NA
Name of the file to write logs.
```

Command provides option to change namespace with `-n` flag. If user wants to dump logs to a file then `-f` flag could be used. By default logs are dumped to `stdout`.
Command provides option to change namespace with `-n` flag. If user wants to
dump logs to a file then `-f` flag could be used. By default logs are dumped to
`stdout`.

### PipelineRun

The following command will tail logs for all `Taskruns` created by pipelinerun `my-pr` in namespace `default`.
The following command will tail logs for all `Taskruns` created by pipelinerun
`my-pr` in namespace `default`.

```shell
go run test/logs/main.go -pr my-pr
```

### TaskRun

The following command will tail logs for all specified `Taskrun` in namespace `default`.
The following command will tail logs for all specified `Taskrun` in namespace
`default`.

```shell
go run test/logs/main.go -tr my-taskrun
```
```

0 comments on commit a50349c

Please sign in to comment.