提问人:Bandit 提问时间:10/21/2023 最后编辑:Bandit 更新时间:10/23/2023 访问量:119
使用变量对生成进行排队失败,并出现错误 TF400898:发生内部错误
Queuing a build with variables failing with error TF400898: An Internal Error Occurred
问:
我正在使用 Rest API 对新构建进行排队。当 UNC 路径类似于下面的路径时,它将失败
\\xxx.com\global\Engineering\Builds\Agile
Invoke-RestMethod : {"$id":"1","innerException":null,"message":"TF400898: An Internal Error Occurred. Activity Id: c3442c5b-8ab6-4102-a22b-5d569cb7271c."
它的唯一工作方式是将 UNC 更改为:
\\\\xxx.com\\global\\Engineering\\Builds\\Agile
导致此问题的原因是什么,我该如何解决?
这是我的代码:
$BuildPath = "\\xxx.com\global\Engineering\Builds\Agile"
$BranchName = "v8.6.4x-SP"
$releaseUri = "https://dev.azure.com/xxx/Idu%20Client-Server/_apis/build/builds?api-version=5.0-preview"
$body = @{}
$body = @{
definition = @{
id = "26845"
}
parameters = '{"BranchName":"' + $BranchName + '","BuildPath":"' + $BuildPath + '"}'
}
$releaseResponse = Invoke-RestMethod -Method Post -ContentType "application/json" -Uri $releaseUri -Body ($body | convertTo-json -Compress -Depth 10) -Headers $header
答:
0赞
Bandit
10/23/2023
#1
我更改了代码,现在它正在工作
$BuildPath = "\\xxx.com\global\Engineering\Builds\Agile"
$BranchName = "v8.6.4x-SP"
$releaseUri = "https://dev.azure.com/xxx/Idu%20Client-Server/_apis/build/builds?api-version=5.0-preview"
$body = @{}
$body = @{
definition = @{
id = "26845"
}
parameters = '{"BranchName":"' + $BranchName +'","BuildPath":' + ($BuildPath | ConvertTo-Json -Depth 100 -Compress) + '}'
}
$releaseResponse = Invoke-RestMethod -Method Post -ContentType "application/json" -Uri $releaseUri -Body ($body | convertTo-json -Compress -Depth 10) -Headers $header
评论