工件依赖关系无法解决

时间:2017-02-16 13:51:23

标签: teamcity teamcity-9.0 artifacts

我有一个teamcity工作,将一个文件发布为工件(这是我能找到的最简单的配置,可以重现这个问题)

enter image description here

我有另一份工作将此工作作为快照依赖项和工件依赖项

enter image description here

第二个作业无法从日志中的以下内容开始:

[13:42:27]Collecting changes in 1 VCS root (2s)
[13:42:27][Collecting changes in 1 VCS root] VCS Root details
[13:42:27][VCS Root details] "xxx" {instance id=842, parent internal id=191, parent id=XXXXX, description: "GITURL.git#refs/heads/master"}
[13:42:32]Skip checking for changes - changes are already collected
[13:42:32]Clearing temporary directory: /home/centos/buildAgent/work/buildTmp
[13:42:32]Publishing internal artifacts
[13:42:32][Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[13:42:32][Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[13:42:32]Checkout directory: /home/centos/buildAgent/work/56c889e980287ca6
[13:42:32]Resolving artifact dependencies
[13:42:32][Resolving artifact dependencies] Started downloading files from <XXXX :: Build and push images, build #0.0.34 [id 256119]>
[13:42:32][Resolving artifact dependencies] Failed to resolve artifact dependency <XXXX :: Build and push images, build #0.0.34 [id 256119]>: IO exception while creating or opening temp file: No such file or directory (jetbrains.buildServer.artifacts.ResolvingFailedException)
[13:42:32]Publishing internal artifacts
[13:42:32][Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[13:42:32][Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[13:42:32]Build failed to start. Artifacts will not be published for this build
[13:42:33]Build finished

我们已经验证了teamcity服务器确实具有必要的工件。

当我在配置依赖关系时单击“检查工件依赖关系”时,他们解决这些依赖关系而没有问题......

[13:46:45]: Dependency resolving started...
[13:46:45]: Downloading artifacts from: http://tcurl:8888
[13:46:45]: Downloading teamcity-deploy.sh from <XXXX :: Build and push images, build from the same chain> to teamcity-deploy.sh; 
[13:46:45]: <XXXX :: Build and push images, build from the same chain> teamcity-deploy.sh => teamcity-deploy.sh
[13:46:45]: Dependency resolving finished successfully

有没有人对可能导致此问题的原因有任何建议?

2 个答案:

答案 0 :(得分:1)

选择了“从同一链构建”的快照依赖关系具有基于修订号的“时刻”关系。因此,工件需要的不仅仅是存在,它必须存在于该修订版本中。从构建配置页面成功解析的能力并不意味着所有与快照相关的构建都将。确保处理最新版本的一种方法是从两个配置所在的项目页面内的构建链选项卡中展开。扩展顶部链并确保从同一个链中运行。您是否可以在成功页面上看到来自同一链中构建的工件?

答案 1 :(得分:1)

这是Teamcity中的已知错误,无法自动创建临时子文件夹:https://youtrack.jetbrains.com/issue/TW-42473#tab=Comments

您可以将TC升级到v10 RC1或将临时文件夹移动到工作目录之外,这已被证明可以正常工作。