Problems downloading artifacts when using build tag

I am having problems downloading artifacts when using build tags.  I can, however, access and download the same artifacts using the build id.  It seems that the symlink from the tag to the build idea is not being made when the tag is manually applied in the TeamCity UI.

I can visually verify that the tag is applied in the TeamCity WebUI

Build Tag - Does NOT work
http://<server>/guestAuth/repository/download/<project>/<tag>.tcbuildtag/<artifact>.zip
http://<server>/guestAuth/repository/download/<project>/<tag>.tcbuildtag/teamcity-ivy.xml <- Unable to see this file

Build ID - DOES work
http://<server>/guestAuth/repository/download/<project>/<buildid>:id/<artifact>.zip
http://<server>/guestAuth/repository/download/<project>/<buildid>:id/teamcity-ivy.xml <- I CAN see this file and all artifacts


Any ideas on what is going on?  I have seen this happen on several projects (but not all projects).


BTW, I am using the following build on a Windows 2012 server:

TeamCity Enterprise 8.1.1 (build 29939)

4 comments
Comment actions Permalink

Hi,

What error do you receive when trying to download build using build tag? Could you please check are there any warnings in teamcity-server.log?
Are you able to download artifacts using curl -O command in console?
Do you have proxy server configured? Do you use antivirus, if yes please try to switch it off.

0
Comment actions Permalink

The error I am receiving is as follows:


HTTP Status 404 - Could not find build by revision rule: 0.1.1.tcbuildtag


The URL I am attempting to retrieve is as follows:
http://<server>/repository/download/<project_name>/0.1.0.tcbuildtag/<artifact>.tar.gz

And the error in the teamcity-server.log is as follows:
[2014-09-04 09:00:58,918]   INFO - s.RepositoryDownloadController - Responding with 404 error: Could not find build by revision rule: 0.1.0.tcbuildtag. Request details: GET '/repository/download/<project>/0.1.0.tcbuildtag/<artifact>.tar.gz', from client <IP>:<PORT>, user-agent curl/7.30.0, authenticated as special user 'guest' (Guest user) {id=-1000}

I even tried removing the build tag and reapplying and received the same error.  From the logs:

[2014-09-04 09:00:37,557]   INFO - tbrains.buildServer.ACTIVITIES - Build "#486 {build id=51355}"'s tags were changed by "'<username>' (Brian Wallace) {id=8}" with comment "Removed: 0.1.0"
[2014-09-04 09:00:43,614]   INFO - tbrains.buildServer.ACTIVITIES - Build "#486 {build id=51355}"'s tags were changed by "'<username>' (Brian Wallace) {id=8}" with comment "Added: 0.1.0" \
[2014-09-04 09:02:10,621]   INFO - s.RepositoryDownloadController - Responding with 404 error: Could not find build by revision rule: 0.1.1.tcbuildtag. Request details: GET '/repository/download/<project>/0.1.1.tcbuildtag/teamcity-ivy.xml', from client <IP>:<PORT>, authenticated as '<username>' (Brian Wallace) {id=8}

And no, I am not able to download artifacts using "curl -O" by the build tag.  I am able to download them when using the build id, however.

No proxy server or antivirus is in-use on this server.

I am still baffled because we have been using this same method to retrieve artifacts by the build tag in dozens of projects.  This problem seems new and appears to be limited to a subset of projects.

0
Comment actions Permalink

Any clues?  This still is a problem for certain projects.

Can anyone point me to where the teamcity-ivy.xml file should exist on the teamcity master filesystem?  Maybe I can poke around and see if that file even exists.

0
Comment actions Permalink

Hi,

Sorry for delay. In your log I see that you have added one tag (0.1.0) but performed request to another (0.1.1), have you copied incorrect log? Also have you waited for some time after applying tag and before downloading artifacts?

Do you download artifacts from default branch, if not do you add branch=<branch_name> parameter to the URL, like this:

http://localhost:8111/httpAuth/repository/download/HelloWorld_Build1/br1.tcbuildtag/Test.cpp?branch=branch1
0

Please sign in to leave a comment.