Search code examples
teamcityteamcity-9.0artifacts

Artifact Dependencies not resolving


I have a teamcity job that publishes a single file as an artifact (this is the simplest configuration i could find that reproduces this issue)

enter image description here

I have another job that has this job as a snapshot dependency and an artifact dependency

enter image description here

The second job fails to start with the following in the logs:

[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

We have verified that the teamcity server does indeed have the necessary artifact.

When i click on "Check artifact dependencies" when configuring dependencies they resolve without issue...

[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

Does anyone have any suggestions as to what could be causing this issue?


Solution

  • This is a known bug in Teamcity where by the temp sub folder fails to be auto created: https://youtrack.jetbrains.com/issue/TW-42473#tab=Comments

    You can upgrade TC to v10 RC1 or move the temp folder used to one outside of the working dir and this has been proven to work fine.