Add doc for break feature for loop (#749)

* Add doc for break feature for loop

* Fix typos

Co-authored-by: Tommy Li <Tommy.chaoping.li@ibm.com>
This commit is contained in:
Gang Pu 2021-10-15 00:12:08 +08:00 committed by GitHub
parent e9749dc2de
commit 01ed23392b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,9 @@
# Parallelism # Parallelism
`Parallelism` is to define the number of pipelineruns can be created at the same time. It must be eqaul to or bigger than 1. If it's not set then the default value will be 1. If it's bigger than the total iterations in the loop then the number will be total iterations. `Parallelism` is to define the number of pipelineruns can be created at the same time. It must be eqaul to or bigger than 1. If it's not set then the default value will be 1. If it's bigger than the total iterations in the loop then the number will be total iterations.
# Break
It's common to break the loop when some condition is met, like what we do in programming languages. This can be done by specifying the task name with the `last-loop-task` label. When the task specified the label is skipped during pipelineloop iteration, the loop will be marked `Succeeded` with a `pass` condition, and no more iteration will be started. The common use case is to check the condition in the task with `when` expression so that to decide whether to break the loop or just continue.
# Verification # Verification
- check controller and the webhook. `kubectl get po -n tekton-pipelines` - check controller and the webhook. `kubectl get po -n tekton-pipelines`
``` ```