I came up with the error:
The job running on agent has exceeded the maximum execution time of 60.
I found different posts showing a graphical interface with an option to change that timeout that I could never find.
But I found the way to do it from the YAML file azure-pipelines.yml
.
Anything you are doing must be under the jobs
construct to set the timeoutInMinutes
parameter.
In the default examples they don't use this jobs
construct, I guess to simplify it, but that made me lose quite some time to find out how to do it.
azure-pipelines.yml
should look like:
jobs:
- job: "run stuff for max time"
timeoutInMinutes: 0
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: docker build -f Dockerfile -t my_dockerfile_to_build .
displayName: 'docker build'
# This means up to 6h, this one must be <= the upper one... in theory, havent tested
timeoutInMinutes: 0
# Even if it fails I want to push the image to DockerHub for inspection
continueOnError: true