Zip file download in artifacts
I've got a composite configuration where i pull in artifacts from previous steps in the build chain. My artifact dependencies are set up as follows:
Release/*.*=>Public/Release_%build.number%.zip
Internal=>Internal
Any zip files that get pulled in to the Internal directory are downloadable by clicking on them however the zip file that gets created in Public directory only allows you to expand its contents and download the files contained inside it.
I'm assuming this is on purpose and is just for compressing individual artifacts rather than providing a zip download?
If theres no way around that, whats the best way for me to zip up these files and provide the zip as an easily downloadable artifact?
Thanks
Please sign in to leave a comment.
Hi Chris,
which version are you using? Also are you using the default tomcat or did you deploy teamcity somewhere else? Do you have TeamCity behind a proxy?
I've just tried taking the files of a test build and publish them with the *.* => Public/filename.zip and I can expand the file by clicking the "+" symbol, but also download it by simply clicking the filename just fine.
If you hover the mouse over the file, it should be a link (most browsers will display its target in a hint at the bottom of the window), so you might check that way whether something is wrong. Also, what's the exact name your file is getting with the %build.number% bit? Maybe something on your build number is making the request fail?
Thanks for your reply. I'm using teamcity 2017.2.3 (build 51047). It's a default installation (even internal database) on a windows 10 virtual machine. It's not behind a proxy.
I've tried clicking on the zip file in chrome and edge but the link is displayed as buildserver/# where as all of the other files seem to have proper urls such as buildserver/repository/downloads/..... etc.
One of the zip file artifacts is called Release_1.0.151.0.zip inside the Public directory in the build artifacts.
This also has identical behaviour whether i'm on the artifacts page for the build or whether its just on the home page where it shows the last build.
Thanks again
Hi Chris,
This is pretty strange. Could you please send us the build log using the "Submit a request" button on top? I've spun up a Windows 10 VM, set up a process that sends two files to a file with that name, also set up dynamically, and I can download the file just fine. Maybe the log is able to point at some specific issue.
Really appreciate this thanks. The final stage in my build pipeline that combines the files into a zip file artifact is a composite (aggregating results) build configuration, i realise i didn't mention it before. Maybe that is the difference between our setups?
The build log seems to only be a 4 lines long and none of the entries seem to be about doing anything with artifacts, just about collecting changes from the VCS root and then build finished. Is there anything i need to do to get more detailed logs for you?
Thanks
Hi Chris,
the build log as shown on the webpage should be collapsed per-phase of the build. If you click on the "+" sign, it should expand and display more information, but this is for displaying in a UI. For review, the same page has a link on the top right to "Download full build log", indicating an estimate in size. Please send that file, as it will contain all the information.
A follow up, I just tested with the build configuration and I think I understood where the problem resides. Yes, our set ups differed right there, and in my set up, I didn't realize you were performing that as an artifact dependency, but was trying to publish the file as an artifact of the own build, which works just fine.
Artifact dependencies do not generate zip files, in fact, if you check, the icon you should see in your "Release_number.zip" file is a folder icon, while other zip files will show an "archive" icon instead. In artifact dependencies, the files are copied "as is".
With this in mind, a solution should be "easy". Just move the "*.* => Release.zip" to the "Artifact paths" of the previous build, that way they will be automatically posted as a zip, just like all other files in "Internal" are. Is there a reason for this not to be an option?
Although i'd prefer that all artifacts from previous build stages stay separate and then are combined at the very last stage, your solution to move building the zip to the previous stage worked great. Thanks for your help, really appreciate it!
You could easily work around this by creating a dummy build before your last one that collects all different packages and publishes all results as a single zip artifact, then your composite build can pick up that one instead. It would generate a bit of an overhead but might be simpler.