Azure Devops solution for max excution time



  • Azure Devops has a 60 minutes max execution time for pipelines but sometimes my deployment takes much more than this, the pipeline time out and, since is a time out, no further tasks are run in the pipeline, even the ones that send email/message about the error on the pipeline. I cannot change the timeout (budget issue).

    I am thinking in start the deployment process (is async), finishing the pipeline with a status other than `` success, and using a trigger (I can create a trigger on the system I am deploying to do something when the deploy finish) to call the Azure DevOps API and change the status of the pipeline to success/failed and/or start another pipeline to run the post-deploy steps.

    Is this overenginering? Is there a better way to solve this problem?



  • If you separate your tasks in to different jobs, each job has 60 min independently of the next job when running on a MS hosted agents and you can manually set a longer timeout if you use a self hosted agent for a job.

    For example my automated tests take longer then 60 minutes so I use a timeoutInMinutes Property on the job of 360 minutes, I am using a self hosted agent so that is why I am not limited to the 60min, more details on agents https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=browser

    - job: RunTests
        timeoutInMinutes: 360
        displayName: Automated tests Job
        variables:
        - group: eStrategyURLs      
        - name: Env
          value: 'UAT'
       ....
      steps:
          - checkout: QA-Automation
            path: s/$(qaTestCodeRepoName)
    
      - template: '..\SharedResources\CypressTests.Template.yml'
        parameters:
          emailList: $(Build.RequestedForEmail)
    

    ...



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2