New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: how to extract archive contents during dependency resolution #24
Comments
Hi @chefhoobajoob, the TeamCity Artifactory Plugin does not currently include the option to extract zip files after they are downloaded from Artifactory. You can probably unzip the file locally using a shell script that is executed after the download. If your download is more complicated and requires more flexibility, you can consider embedding JFrog CLI into a script that handles your Artifactory download or upload. |
Dang. Ok, so since I'm new to both TC and Artifactory, would this be done by inserting a build step ahead of the step that performs the compilation of the dependent component (and afterwards to create zip archives and publish)? Something like this?
|
@chefhoobajoob, Yes, this is something you can implement and will work fine. If your CI flow permits that, please also consider not to store a zip file in Artifactory, but have all of your build files deployed unzipped, by using the "Custom published artifacts" fields. That allows you to later perform operations on all artifacts of a specific build (such as Artifactory Promotion). You can also publish Build Info to Artifactory for every build and have Artifactory manage this information for you. |
@eyalbe4: thank you for your feedback. This issue can probably be closed, but I do have a couple questions about publishing to Artifactory. So I updated my build as you suggested and the first build worked just fine, but all subsequent publishing attempts fail with the same error:
...I can't find any way to publish the results of a second build. It seems to be thinking that I'm trying to replace or update results from the first build. Strangely, I see similar errors in the first build, but for some reason it succeeded, and I can see the published results in Artifactory. Not so with any later build. What could be causing this error? This is an older version of Artifactory: 2.6.6. We are in the process of upgrading - could this be a problem related to some kind of incompatibility between the plugin and the server? |
@chefhoobajoob, it looks like Artifactory, or more likely a proxy you have before your Artifactory instance is returning an HTML response, and the client fails because it expects a json response. I'd try to see if there's anything in the Artifactory logs and if the failing request is not included in Artifactory's request log, check the proxy logs. For troubleshooting, you can also try and have your TeamCity agent bypass the proxy and send the requests to the URL Artifactory directly. |
@eyalbe4: I don't think there's a proxy between Artifactory and the TC agents, but I will check |
@eyalbe4 : I can confirm that there's no proxy, but I can't get at the Artifactory logs yet because I'm not the admin, so I hope to learn more later. What I'm noticing though, is that Artifactory seems to require me to manually include version and build information in the path to published artifacts, or else it thinks I'm trying to overwrite existing artifacts. That is, in my component build, rather than defining the published artifacts like so:
...I have to define the paths like this:
...which is not only more verbose, but I have to change it for different build configurations, so it's error-prone too. Am I missing something? Is there a way to avoid this, or for the plugin to ensure that artifacts from different builds of the same component don't step on each other without requiring this manual configuration? |
Would be great if the plugin supported extraction. |
@ElanHasson, |
Hi, is this still a missing feature ? |
@RichardGe, |
We are using the latest version of the teamcity plugin for Artifactory and TC version 9.1.6.
I have a c++ project with an Artifactory dependency that consists of a zip file containing the header/lib file system of the dependency.
I can find no documentation anywhere on how to use the TeamCity Artifactory plugin to extract the entire contents of the archive into a directory of my choosing.
I have tried the syntax below using the plugin's
Custom build dependencies
field, but the plugin complains that the**
wildcard is illegal. How can I accomplish this operation during dependency resolution prior to the build?The text was updated successfully, but these errors were encountered: