在 TFS 上重新运行成功的构建步骤
Rerun successful build-step on TFS
根据 other SO question 我有一个测试在 tfs 中偶尔会失败,这意味着其中一个构建步骤有时会失败。
构建步骤可能每隔 10 到 20 次就会失败 运行。
因此我想知道,是否有一种简单的方法可以重新运行在 tfs 上成功构建步骤?
我认为没有一项功能可以 运行 一个任务 n
次,但这里有一个 运行 多次构建的解决方法(PowerShell 脚本):
$times = 30
For ($i=1; $i =lt $times; $i++) {
Write-Host "*** Start to build $i time ***"
# I use VS 2019 Enterprise, change the path if you have another version
cd "C:\Program Files (x86)\Microsoft Visual Studio19\Enterprise\MSBuild\Currnet\Bin"
# Change the folder/sub folder to your solution path
./msbuild.exe "$(Build.SourcesDirectory)\{your soultion name}.sln"
}
根据 other SO question 我有一个测试在 tfs 中偶尔会失败,这意味着其中一个构建步骤有时会失败。
构建步骤可能每隔 10 到 20 次就会失败 运行。
因此我想知道,是否有一种简单的方法可以重新运行在 tfs 上成功构建步骤?
我认为没有一项功能可以 运行 一个任务 n
次,但这里有一个 运行 多次构建的解决方法(PowerShell 脚本):
$times = 30
For ($i=1; $i =lt $times; $i++) {
Write-Host "*** Start to build $i time ***"
# I use VS 2019 Enterprise, change the path if you have another version
cd "C:\Program Files (x86)\Microsoft Visual Studio19\Enterprise\MSBuild\Currnet\Bin"
# Change the folder/sub folder to your solution path
./msbuild.exe "$(Build.SourcesDirectory)\{your soultion name}.sln"
}