Absolute paths not supported for the artifacts?

Hi,

While we were using TeamCity 6.5.4 (I haven't tested since we've gone to 6.5.5 two days ago, but I highly suspect the behavior hasn't change), I found it impossible to use an absolute path for the artifacts in the General settings page.

Artifacts.JPG
In this project, the checkout directory is P:\WS\TeamCity\ProjectA.  What I find is that in the artifact paths, I can only use relative paths starting from the checkout directory.

Hence:

./UnitTests/Reports
will refer to

P:\WS\TeamCity\ProjectA\UnitTestsReports
which is fine.

But trying to point to P:\*.bin doesn't work at all.  I tried different variations, to no avail

[01:07:46]: [Publishing artifacts] Paths to publish: [P:/*.bin => bin, P:\*.bin => bin2, p:\*bin => bin3, p:/*bin => bin4, ./UnitTests/Reports => Reports, ./UnitTests/Coverage.xsl]
[01:18:16]: [Publishing artifacts] Artifacts path P:/*.bin not found
[01:18:16]: [Publishing artifacts] Artifacts path P:/*.bin not found
[01:18:16]: [Publishing artifacts] Artifacts path p:/*bin not found
[01:18:16]: [Publishing artifacts] Artifacts path p:/*bin not found


while there was many .bin files in P:\

Tried to point to them relatively to the checkout path using ..\ too, this didn't worked either.

[13:30:16]: [Publishing artifacts] Paths to publish: [../../../*.bin => bin, ./../../../*.bin => bin2, ../../../*bin => bin3, ./../../../*bin => bin4, ./UnitTests/Reports => Reports, ./UnitTests/Coverage.xsl]
[13:43:05]: [Publishing artifacts] Artifacts path ../../../*.bin not found
[13:43:05]: [Publishing artifacts] Artifacts path ../../../*.bin not found
[13:43:05]: [Publishing artifacts] Artifacts path ../../../*bin not found
[13:43:05]: [Publishing artifacts] Artifacts path ../../../*bin not found

I had to create another build configuration, executed right after that one, and in its build steps, copy all P:\*.bin into .\BinFiles, then in the artifacts I put ./BinFiles => BinFiles and it worked.

I couldn't even do that into the main build config (adding an extra build step) cause the errors generating the .bin files makes msbuild.exe exit with 1, thus TeamCity does not keep going with the build steps.
2 comments
Comment actions Permalink

My first post might be misleading because of the attached image.  That image shows the artifacts list after my patch.  To make this work I had to add an extra build step.  That extra step copy all of the P:\*.bin into a BinFiles subdirectory.  That one is accessible for the artifacts.

Problem is: if our build fails, this extra step is not executed.

I would much rather have the absolute paths be supported than to have to do these extra tricks.

0
Comment actions Permalink

Hi ,

My issue is Artifacts are not generated for success build for few times,  saying that the path is not found.

Here I added detailed steps. Please have a look and help me to get the artifacts every time for success builds.

We are using TeamCity Enterprise 2017.1.2 for CI  and CD for .Net applications and we have 2 build agents.

Default Artifact directories is: system\artifacts 

1.Artifacts generated successfully: build is published and deployed to QA environment  successful.

   We have option in TeamCity like Artifacts path at build level where i have mentioned path like below. 

GHY.GK.Wcf\DeploymentResources\_PublishedWebsitesGHY.GK.Wcf_Package => Services_Package
GHY.GK.Web\DeploymentResources\_PublishedWebsites\GHY.GK.Web_Package => Web_Package

Artifacts generated successful with below message:

[Publishing artifacts] Collecting files to publish: [GHY.GK.Wcf/DeploymentResources/_PublishedWebsites/GHY.GK.Wcf/_Package => Services_Package, GHY.GK.Web\DeploymentResources\_PublishedWebsites\GHY.GK.Web_Package => Web_Package]Artifacts generated successfully: The artifacts path is at individual build 

[12:41:02][Publishing artifacts] Publishing 5 files using [ArtifactsCachePublisher]: GHY.GK.Wcf/DeploymentResources/_PublishedWebsites/GHY.GK.Wcf_Package => Services_Package
[12:41:02][Publishing artifacts] Publishing 5 files using [WebPublisher]: GHY.GK.Wcf/DeploymentResources/_PublishedWebsites/GHY.GK.Wcf_Package => Services_Package
[12:41:03][Publishing artifacts] Publishing 5 files using [ArtifactsCachePublisher]: GHY.GK.Web/DeploymentResources/_PublishedWebsites/GHY.GK.Web_Package => Web_Package
[12:41:03][Publishing artifacts] Publishing 5 files using [WebPublisher]: GHY.GK.Web/DeploymentResources/_PublishedWebsites/GHY.GK.Web_Package => Web_Package

2. Artifacts are not generated for few times, but the build is published and deployed to QA environment  successful.

Error: Artifacts not generated for same build and same path like above.  saying that the path is not found.

Error: [Publishing artifacts] Artifacts path 'GHY.GK.Wcf/DeploymentResources/_PublishedWebsites/GHY.GK.Wcf/_Package' not found
[Publishing artifacts] Artifacts path 'GHY.GK.Web/DeploymentResources/_PublishedWebsites/GHY.GK.Web/_Package' not found

Please help me on this.

0

Please sign in to leave a comment.