I am using Yaml pipelines in Azure Dev Ops, and have a multi-stage build/deploy.
Based on the documentation here : https://learn.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml
It suggests a job has a property of timeoutInMinutes.
We however have a -Job, which is followed by a -Deployment (which the docs say is just a special type of job). The deployment is executed on a Azure Devops Environment, which is just an Azure Deployment Agent on a self-hosted docker container.
The execution works fine but the job always times out at 60 minutes regardless.
Example YML
-jobs
- job: JobA
timeoutInMinutes: 30
[...]
- deployment: JobB
timeoutInMinutes: 360
dependsOn:
- JobA
environment:
name: MyEnvironment
resourceType: VirtualMachine
tags: "TheAgent"
strategy:
runOnce:
deploy:
timeoutInMinutes: 360
steps:
[... long running task...]
The issue is that the deployment job deploys and then has a task within it to run off some automated regression tooling which takes between 70-90 minutes.
The job running on agent [name] ran longer than the maximum time of 60 minutes.
I must be missing something surely? For a self-hosted agent there is no reason to have this limit? Is there an alternative to this?
As per the doc, you can also set the timeout at
tasklevel in the deployment job. Please removetimeoutInMinutesafterdeploy:as it's not the correct syntax.sample as below:
Checked on my side, with deployment job which has a self-hosted agent(VM,not container),
even not have timeout in task level, it can work more than 1hour. Hence, you can also check if the self-container is still working after 1hour.