azure - Azure Devops 管道 PublishBuildArtifact 任务错误容器找不到
问题描述
我正在尝试在 ADO 管道中发布构建工件,但最终出现了问题
由于找不到容器而无法上传工件
早些时候,相同的脚本运行良好。
我所做的唯一更改是设置trigger: none而不是trigger: master以停止 CI 构建触发器并手动运行管道。
yaml
trigger:
- master
pool:
vmImage: windows-2019
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
displayName: 'Node.js Install'
- task: Npm@1
inputs:
command: 'install'
workingDir: '$(System.DefaultWorkingDirectory)\OnlineBooking'
- script: |
workingDir: '$(System.DefaultWorkingDirectory)'
node build.js
displayName: 'Build Project'
- task: CopyFiles@2
inputs:
SourceFolder: 'D:\a\1\s\temp\OnlineBooking\build\wap\build'
Contents: 'OnlineBooking.zip'
TargetFolder: '$(build.artifactstagingdirectory)'
CleanTargetFolder: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: 'OnlineBooking'
日志:
Retry attempt 0. Exception: The container 16892178 could not be found.
2021-08-13T15:05:54.9483088Z Intermittent failure attempting to call the restapis System.Threading.Tasks.Task`1[System.Net.Http.HttpResponseMessage] <AssociateAsync>b__0(). Retry attempt 1. Exception: The container 16892178 could not be found.
2021-08-13T15:05:54.9484146Z Intermittent failure attempting to call the restapis System.Threading.Tasks.Task`1[System.Net.Http.HttpResponseMessage] <AssociateAsync>b__0(). Retry attempt 2. Exception: The container 16892178 could not be found.
2021-08-13T15:05:54.9485219Z Fail to upload 'OnlineBooking/OnlineBooking.zip' due to 'The container 16892178 could not be found.'.
2021-08-13T15:05:54.9487833Z Microsoft.VisualStudio.Services.FileContainer.ContainerNotFoundException: The container 16892178 could not be found.
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponseAsync(HttpResponseMessage response, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync(HttpRequestMessage message, HttpCompletionOption completionOption, Object userState, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.FileContainer.Client.FileContainerHttpClient.CreateItemForArtifactUpload(Int64 containerId, String itemPath, Guid scopeIdentifier, String artifactHash, Int64 fileLength, CancellationToken cancellationToken, Object userState)
at Microsoft.VisualStudio.Services.Agent.Worker.Build.FileContainerServer.<>c__DisplayClass17_1.<<AssociateAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Services.Agent.Worker.RetryHelper.Retry[T](Func`1 action, Func`2 timeDelayInterval, Func`2 shouldRetryOnException)
at Microsoft.VisualStudio.Services.Agent.Worker.RetryHelper.Retry[T](Func`1 action, Func`2 timeDelayInterval, Func`2 shouldRetryOnException)
at Microsoft.VisualStudio.Services.Agent.Worker.Build.FileContainerServer.AssociateAsync(IAsyncCommandContext context, ConcurrentQueue`1 associateQueue, CancellationToken token)
2021-08-13T15:05:54.9490406Z 1 files failed to upload, retry these files after a minute.
2021-08-13T15:05:54.9490658Z Retry file upload after 60 seconds.
2021-08-13T15:06:00.0088101Z Retry file upload after 55 seconds.
2021-08-13T15:06:05.0568617Z Retry file upload after 50 seconds.
2021-08-13T15:06:10.1177816Z Retry file upload after 45 seconds.
2021-08-13T15:06:15.2097932Z Retry file upload after 40 seconds.
2021-08-13T15:06:19.7734672Z Retry file upload after 35 seconds.
2021-08-13T15:06:24.8510986Z Retry file upload after 30 seconds.
2021-08-13T15:06:29.9148313Z Retry file upload after 25 seconds.
2021-08-13T15:06:34.9479097Z Retry file upload after 20 seconds.
2021-08-13T15:06:40.0238444Z Retry file upload after 15 seconds.
2021-08-13T15:06:45.0731398Z Retry file upload after 10 seconds.
2021-08-13T15:06:50.1178453Z Retry file upload after 5 seconds.
2021-08-13T15:06:55.1807933Z Start retry 1 failed files upload.
解决方案
推荐阅读
- php - 在codeigniter登录后无法将用户的所有数据保留在会话中
- javascript - 使用 redux 道具更新的 useEffect
- oracle - plsql 过程不是过程或未定义
- perl - Perl - 需要一遍又一遍地调用 system('diff')
- php - 如何使用 PHP 在浏览器控制台上打印
- python - 我正在尝试编写一个“机器人”服务员程序,但我似乎找不到哪里出错了
- java - JavaFX:使 LocalDateTime 触发事件?
- constraint-programming - 如何将两个元素放在同一个序列中?
- java - Gradle + JavaFX - 构建“资源”目录的正确方法是什么?
- c++ - 使用 MPI 发送数组会导致错误和截断