azure-devopsazure-pipelinestimeout

Azure DevOps: Reduce build pipeline timeout to 30 minutes


In Azure DevOps, my pipeline times out after 60 minutes - I want to reduce it to 30 minutes. I looked at all the organization and project settings but wasn't able to find anything through the UI.

Is there a way to change the timeout for build pipelines? Can it be set from YAML?


Solution

  • 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).