2

在我们的设置中,maven 构建在 TeamCity 代理上运行,并被复制到 TeamCity 服务器存储库。然后我使用 teamcity-s3-plugin 将它们复制到 S3 存储桶。构建中工件的总大小为 3.3GB,将它们发布到服务器大约需要 20 分钟。我们测试了 TeamCity 代理和服务器之间的连接,复制这个大小的文件大约需要 5 分钟,sptping 数据的速度为 11.2 MB/s。将所有工件复制到 S3 需要 3 分钟。延迟的原因可能是什么?这是我在代理日志文件中看到的内容:

[2015-07-15 09:01:25,235]  DEBUG - r.artifacts.impl.HttpDiskCache - Http cache put: new entry [https://ci.adsquare.com/httpAuth/repository/download/adsBackendLiveMvn/1353.tcbuildid/jars/weather-service/
target/weather-service-0.0.1-SNAPSHOT.jar] 
[2015-07-15 09:01:26,485]  DEBUG - r.artifacts.impl.HttpDiskCache - Http disk cache - cached file from [/home/ads/agent/build01/work/864fff464676bc95/weather-service/target/weather-service-0.0.1-SNAPSHO
T.jar] under key [https://ci.adsquare.com/httpAuth/repository/download/adsBackendLiveMvn/1353.tcbuildid/jars/weather-service/target/weather-service-0.0.1-SNAPSHOT.jar] 
...     messages of this kind for other artifacts
[2015-07-15 09:01:28,390]  DEBUG -    jetbrains.buildServer.AGENT - Agent ping from server 
[2015-07-15 09:01:48,895]  DEBUG -    jetbrains.buildServer.AGENT - Agent ping from server 
...
[2015-07-15 09:22:19,356]  DEBUG -    jetbrains.buildServer.AGENT - Agent ping from server 
[2015-07-15 09:22:39,862]  DEBUG -    jetbrains.buildServer.AGENT - Agent ping from server 
[2015-07-15 09:22:42,083]   INFO -    jetbrains.buildServer.AGENT - Done publishing artifacts to 'jars', using 'WebPublisher', total files published: 144 
[2015-07-15 09:22:42,083]   INFO -    jetbrains.buildServer.AGENT - Done publishing artifacts to 'jars', using 'ArtifactsCachePublisher', total files published: 144 
[2015-07-15 09:22:42,083]   INFO -    jetbrains.buildServer.AGENT - Done: Publishing files 

那么在服务器 ping 代理的 20 分钟内会发生什么?是复制文物的时候吗?为什么比复制一个文件要花 4 倍的时间?是否有任何配置选项来优化流程?

而在另一件事上 - 有没有更好的方法将文件复制到 S3?是否可以从代理主机执行此操作而无需先将它们发布到 TeamCity 服务器?

4

0 回答 0