Is it possible to either loop or delay between running tasks in either build or release pipelines? I deploy containers as part of those pipelines and they take time to spin up and be available for webtests, so I can not run webtest immediately following Release task. What can be a solution to this requirements inside TFS or VSTS?
For delay 10 minutes in your build , I suggest you add a powershell task and add the script:Start-Sleep -Seconds 600 . Then the build will delay 10 minutes. Hope it helps.
You can disable the agents to prevent the pipeline from running. Go the Agent Pools under Pipelines in Project settings-->Select the agent pool -->Go to Agents tab-->Disable all the agents. You can also use rest api to pause the build pipeline mentioned in the comments.
Our question is related to the second type of jobs; server jobs also known as agentless jobs. Where most of the jobs are executed by a build agent, server jobs are executed directly on the Azure DevOps application server. This means that a server job does not require an agent or any target computers.
Put an in-line PowerShell task in place that runs Start-Sleep -Seconds 10
or however long you want to wait.
Or better yet, write your own script that polls your containers for availability.
You can add an Agentless phase and put a Delay-task in it. Then your build will be delayed X minutes. Then you may continue your pipeline with an agent phase
. Just make sure to configure Run this phase
or set a dependency between the phases. This works in TFS and Azure Devops Server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With