Concurrency Flow

Concurrency Flow #

Not Defined
Defined
completed
queued
started
Yes
No
Yes
No
Yes
No
Controller
Validate & Process Event
Is concurrency defined?
Create PipelineRun with state='started'
Create PipelineRun with pending status and state='queued'
Pipelines-as-Code
Watcher
PipelineRun Reconciler
Check state
Return, nothing to do!
Create Queue for Repository
Is PipelineRun Done?
Add PipelineRun in the queue
If PipelineRuns running < concurrency_limit
Start the top most PipelineRun in the Queue
Return and wait for your turn
Report Status to provider
Requeue Request
Update status in Repository
Update state to 'completed'
Check if concurrency was defined?
Remove PipelineRun from Queue
Start the next PipelineRun from Queue
Done!