1

My pipeline triggers on resources, schedule and merges. Sometimes these can happen almost at the same time and many pipeline runs can be created. I've noticed that the jobs that run don't always belong to the same run.

Example

  • one pipeline A includes 2 jobs j.1 and j.2

  • a resource triggers A.1 and starts j.1

  • another resource triggers A.2 also and queues j.1.

  • A.1 finishes a job and instead of starting j.2 it is A.2 j.1 that starts.

How do I lock the run so that A.1 j.1 and j.2 runs to completion before A.2 starts?

user16908085
  • 95
  • 10

1 Answers1

1

On the agent, the queue is for the job-level not pipeline-level. So, normally the agent will be allocate to the higher priority jobs in the pipelines regardless of whether the jobs are in the same pipeline run.

Currently, we have not method or settings to manager the sort of the queued jobs.

Bright Ran-MSFT
  • 5,190
  • 1
  • 5
  • 12