从那时起,我们的TFS 2015版本在发布工件步骤中随机失败。上传正常启动,在上传一些文件后,此过程将停止并显示以下消息: ## [错误]任务已取消。(见下文)。
通常我们可以通过简单地重新排队另一个构建来解决该问题。然而,这很烦人,与CI / CD的想法相矛盾。
通用错误消息无法告诉我在哪里查找问题。有什么想法吗?
2016-10-26T12:47:47.8071677Z Files found locally 1772,
2016-10-26T12:47:47.8071677Z Files evaluated 1772,
2016-10-26T12:47:47.8071677Z Files left to evaluate 0.,
2016-10-26T12:47:47.8071677Z Files created without upload 0,
2016-10-26T12:47:47.8071677Z Files uploaded 796
2016-10-26T12:47:47.8071677Z Files left to process 976
2016-10-26T12:47:47.8071677Z ---------------------------
2016-10-26T12:47:49.0421524Z Start: UploadArtifact
2016-10-26T12:47:49.0577804Z ##[error]A task was canceled.
2016-10-26T12:47:49.0577804Z End: UploadArtifact
根据@ Patrick-MSFT的建议,我启用了 system.debug 并获得了更多错误详情:
---------------------------
Files found locally 1852,
Files evaluated 1852,
Files left to evaluate 0.,
Files created without upload 0,
Files uploaded 1316
Files left to process 536
---------------------------
Start: UploadArtifact
System.Threading.Tasks.TaskCanceledException: A task was canceled.
End: UploadArtifact
******************************************************************************
Finishing task: PublishBuildArtifacts
******************************************************************************
System.Exception: Task PublishBuildArtifacts failed. This caused the job to fail. Look at the logs for the task for more details.
at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.Run(IJobContext jobContext, IJobRequest job, IJobExtension jobExtension, CancellationTokenSource tokenSource)
******************************************************************************
Finishing Build
******************************************************************************
Worker Worker-89de22b8-0ad4-4541-ad73-a758c9783464 finished running job 89de22b8-0ad4-4541-ad73-a758c9783464
答案 0 :(得分:1)
最后,我通过简单地将构建代理更新到最新版本来解决问题。使用的旧版本是1.105.7。现在我更新到2.105.6。
答案 1 :(得分:0)
对于使用特殊构建任务进行的故障排除,您可以尝试:
当您尝试隔离问题时,上述控制选项参数也很有用。
请仔细检查您是否在“发布工件”的控制选项中设置了超时,该选项代表此任务,只需几分钟。这可能会导致失败。
还可以使用相同的设置创建新的构建定义,并尝试重现您的问题。