azure devops build pipeline reduce the timeout to 30 minutes
Asked Answered
W

3

30

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?

Wellturned answered 7/5, 2019 at 5:13 Comment(0)
A
47

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

Anemoscope answered 29/6, 2020 at 12:39 Comment(2)
If a jobs default timeout is 60 minutes and timeoutInMinutes is added to a task in that job, is the timeout now 60 + (timeoutInMinutes on task). So, for example, if I have task in a job that needs a timeoutInMinutes of 20. Is it 60 + 20 for that job?Hinrichs
@AnthonyKlotz timeoutInMinutes will override the default. The description of that option confirms this "how long to run the job before automatically cancelling" See docs here learn.microsoft.com/en-us/azure/devops/pipelines/process/…Bellbird
G
11

azure devops build pipeline reduce the timeout to 30 minutes

Edit the pipeline you want to modify. On the Options tab, there is an option Build job timeout in minutes, which you can set the Build job timeout, the default value is 60 minutes.

enter image description here

This timeout are including all tasks in your build pipeline rather than a particular job, if one of your build step out of time. Then the whole build definition will be canceled by the server. Certainly, the whole build fails and all subsequent steps are aborted.

Gustin answered 8/5, 2019 at 8:35 Comment(2)
Your answer does not seem to be applicable for YAML based pipelines. I could not find any options tab when editing the pipeline. Also, if you go to triggers, there isn't any options tab there either.Gurgitation
@Gurgitation This is an old answer. Azure DevOps has changed its UI and Option tab is not available for YAML pipeline now.Stylographic
J
1

As per documentation ,

On the Options tab you can specify default values for all jobs in the pipeline. If you specify a non-zero value for the job timeout, then it overrides any value that is specified in the pipeline options. If you specify a zero value, then the timeout value from the pipeline options is used. If the pipeline value is also set to zero, then there is no timeout.

more on,

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=classic&viewFallbackFrom=vsts#timeouts

Jeanniejeannine answered 7/5, 2019 at 5:17 Comment(2)
Also in UI , It's under Option- Build Job - Build Job timeout in minutes:Jeanniejeannine
can you add screen-shot for this? also, I was asking for complete build time rather than particular job timeWellturned

© 2022 - 2024 — McMap. All rights reserved.