cancel
Showing results for 
Search instead for 
Did you mean: 
pb408
Cadet
Cadet
  • 213 Views

OpenShift pipeline - How to allow only one Pipeline run at a time?

Hi I am new to OpenShift and from what I can see if I go to a Pipeline and select start twice, immediately two PipelineRuns will run in parallel. This will cause a error because both run's pods will try to access the same pvc and then the pods will get stuck in a bad state. The pods will have Event messages, "Volume is already used by pod(s)".

How can someone enforce that only one pipeline run at a time can run? Is it possible in OpenShift to have these pipeline runs queue up wait for existing pipeline to complete? Is there an OpenShift solution? If there are no out of the box solutions in OpenShift, are there standard workarounds or addons that exists?

Labels (3)
1 Reply
Wasim_Raja
Moderator
Moderator
  • 76 Views

@pb408 Thanks for reaching out,

Tekton supports conditional tasks or finally tasks, which could be used to ensure that certain tasks are executed only after others finish, but this approach is more suitable for tasks within a single PipelineRun, not across multiple PipelineRuns.

0 Kudos
Join the discussion
You must log in to join this conversation.