Is there a way I can re-initiate failed tasks or agent phase in a TFS release?

Viewed 12188

When a certain task fails in an environment I had to always redeploy the whole environment after fixing the issue. Is there a way I could re-initiate only the failed task or just the phase where the task is failed.

For example: In the screenshot below the last task "Run script *" under "Agent Phase" has failed. I had to re-initiate the whole environment deployment to re-execute the last task which will also executes "Run on Agent" phase as well. This is painful during production release pipeline.

enter image description here

4 Answers

Understand your concern. However, this is not supported at present with on-premises TFS Server 2018.

When you're doing a PROD drop and a step near the end randomly fails, then you can't just rerun from that failed step. Had to re-deploy.

To re-run failed task/step:

Actually, there is a related user voice.

Rerun failed build task/step

https://developercommunity.visualstudio.com/idea/365697/rerun-failed-build-taskstep.html

Multiple people commented and echoed. You could monitor the status of above user voice.

To re-run failed agent phase/ agent job

Also a related user voice:

Retry failed run with multi-stage pipelines

https://developercommunity.visualstudio.com/idea/598906/retry-failed-run-with-multi-stage-pipelines.html

However, this is has been released with Azure DevOps Service now: https://docs.microsoft.com/en-us/azure/devops/release-notes/2019/sprint-158-update#retry-failed-stages Still not available with Azure DevOps/TFS on-premises. Generally, it won't be long until it's released with latest Azure DevOps version.

With all that said, I think you still have to re-deploy on TFS 2018 at present. Sorry for any inconvenience.

In TFS 2018 you don't have this option.

However, in Azure Pipelines you have the option to re-run failed jobs, so I guess in the next release of Azure DevOps Server (TFS) this feature will be.

enter image description here

Related