azure devops build pipeline reduce the timeout to 30 minutes

harishr picture harishr · May 7, 2019 · Viewed 15.8k times · Source

Is there a way to change the timeout for build pipeline, currently the pipeline time's out after 60 mintues. I want to reduce it to 30 minutes.

I looked at all the organization settings and project settings, but not able to find anything on the UI

Or else can it be set from YAML?

Answer

Lars Pellarin picture Lars Pellarin · Jun 29, 2020

For a YAML pipeline the documentation says you can write

jobs:
- job: Test
  timeoutInMinutes: 10 # how long to run the job before automatically cancelling
  cancelTimeoutInMinutes: 2 # how much time to give 'run always even if cancelled tasks' before stopping them

timeoutInMinutes: 0 should also work for individual tasks, and 0 means max value (infinite for self-hosted agents).