I'm trying to setup a build artifact in teamcity but am having issues. Here's the artifact command:
Services\Windows\ApiRequestProcess\ApiRequestLoggerService\bin\Release\* => F:\BuildArtifacts\Services\ApiRequestLogger
And here is one of the errors:
16:43:33]: [Publishing artifacts] Paths to publish: [Services\Windows\ApiRequestProcess\ApiRequestLoggerService\bin\Release\* => F:\BuildArtifacts\Services\ApiRequestLogger, teamcity-info.xml]
[16:43:33]: [Publishing artifacts] Sending files
[16:43:34]: Failed to upload build artifact due to error: java.io.FileNotFoundException: F:\TeamCity\.BuildServer\system\artifacts\API Request Logger Service\API Request Logger Service Build\536\F:\BuildArtifacts\Services\ApiRequestLogger\ApiRequestCore.dll (The filename, directory name, or volume label syntax is incorrect)
Any ideas?
Well your issue is TeamCity stores artifacts in its data directory so you cannot specify an absolute location. Do you need the artifacts in that location? If so you will have to run a task to copy them from the artifacts folder (there is a rest api to help you with the downloading of artifacts)
From the docs
TeamCity stores artifacts on disk in a directory structure that can be accessed directly (for example, by configuring the Operating System to share the directory over the network). The artifacts are stored under /system/artifacts folder. Storage format is described in the TeamCity Data Directory section. Build artifacts are not archived in TeamCity and stay as they are (uncompressed).
@redsquare is correct. TeamCity is archiving artifacts relative to your build. Previous to TeamCity I did it the way you describe too ;)
The real question is why do you want to do that (as your build are already archived)? I'll hazard a guess...
If you are doing it to be accessible for deployment or by another build there is an alternative... In TeamCity speak: Dependencies / Artifact Dependency. You can consume the output of your CI build in another CI build... or in a deploy build in a straight forward manner.
See my answer here for more detail.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With