Hi Shay that actually seems like big help.Does the "module" translate to maven
"artifactId" and "organization" to maven "groupId"?
And what is prettymoduleid?
Thanks!
—
Sent from my phone
On Fri, Apr 11, 2014 at 12:14 AM, shayb <[email protected]> wrote:
> Hi Ittai,
> I'm not sure exactly how are you going to implement this. but I will try to
> answer your questions:
> If what you need is the GAVC information, you can ask the FIleLayoutInfo
> object from the
> repositories<http://repo.jfrog.org/artifactory/libs-releases-local/org/artifactory/artifactory-papi/%5BRELEASE%5D/artifactory-papi-%5BRELEASE%5D-javadoc.jar%21/org/artifactory/repo/Repositories.html>globel
> object by running the getLayoutInfo() method.
> Once you have the
> FileLayoutInfo<http://repo.jfrog.org/artifactory/libs-releases-local/org/artifactory/artifactory-papi/%5BRELEASE%5D/artifactory-papi-%5BRELEASE%5D-javadoc.jar%21/org/artifactory/fs/FileLayoutInfo.html>,
> you can use it's methods such as getModule(), getOrganization(), getExt()
> etc..
> However, if what you are trying to get is the actual deployed artifact
> path, you can use the item.getRepoPath().toPath() to get path as string
> from the RepoPath object.
> As for the getProperties() method, this will return you the artifact's
> properties, for example, when deploying a build by using our plugin, you
> will get the build name and build number etc..
> Hope this helps a bit more.
> Shay.
> On Thu, Apr 10, 2014 at 2:54 PM, ittaiz [via Artifactory] <
> [email protected]> wrote:
>> After doing some more digging it seems I can do one of the following two
>> options, which still use the storage/afterCreate hook, and I really wanted
>> to get your feedback on what's the more recommended approach:
>> 1. Use the item.repoPath.getId which I think should return something like
>> groupId:artifactId:extension:version and parse that to get what I need.
>> 2. Use the global repositories.getProperties(item.repoPath) and see if
>> this map contains the data I need.
>>
>> Thanks again
>>
>>
>> On Thu, Apr 10, 2014 at 2:09 PM, Ittai Zeidman <[hidden
>> email]<http://user/SendEmail.jtp?type=node&node=7579762&i=0>
>> > wrote:
>>
>>> Quick question (since for some reason I can't find it in the
>>> documentation):
>>> It would help me greatly to find the artifact metadata
>>> (groupId/artifactId/version) if they exist along with the url;
>>> Is there a better hook which supplies me with all the information? (it
>>> seems that itemInfo is a bit lowlevel and doesn't know the "metadata")
>>>
>>> Thanks in advance,
>>> Ittai
>>>
>>>
>>> On Wed, Apr 9, 2014 at 3:53 PM, Ittai Zeidman <[hidden
>>> email]<http://user/SendEmail.jtp?type=node&node=7579762&i=1>
>>> > wrote:
>>>
>>>> Hi Itamar,
>>>> Thanks a lot for your reply.
>>>> Your suggestion about the custom plugin and the storage/afterCreate hook
>>>> seems like exactly what I need.
>>>> If it will work out (and I'll update) I will be able to achieve the same
>>>> goal with using a couple of groovy lines instead of writing an entire
>>>> module to extract that info.
>>>>
>>>>
>>>> On Wed, Apr 9, 2014 at 3:40 PM, itamarb <[hidden
>>>> email]<http://user/SendEmail.jtp?type=node&node=7579762&i=2>
>>>> > wrote:
>>>>
>>>>> Hi Ittai,
>>>>>
>>>>> I will split my answer to 2:
>>>>> 1. Handling the builds already deployed to Artifactory
>>>>> 2. Handling future builds
>>>>>
>>>>> 1. In order to get a list of all the artifacts from all builds in
>>>>> Artifactory you could run the ' All Builds
>>>>> <
>>>>> http://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-AllBuilds
>>>>> >
>>>>> ' REST query to get a list of all build names, from this response, on
>>>>> each
>>>>> build name, run the ' Build Runs
>>>>> <
>>>>> http://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-BuildRuns
>>>>> >
>>>>> ' query to get the list of all build numbers under a build name and on
>>>>> each
>>>>> of these, run the ' Build Info
>>>>> <
>>>>> http://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-BuildInfo
>>>>> >
>>>>> ' query to get a list of artifacts from each build.
>>>>>
>>>>> 2. This also can be split into 2 options:
>>>>>
>>>>> a. In order to automate this, you could write a custom user-plugin
>>>>> <
>>>>> http://www.jfrog.com/confluence/display/RTF/User+Plugins#UserPlugins-Build
>>>>> >
>>>>> that will trigger the desired action on a creation of a new artifact by
>>>>> using the ' afterCreate
>>>>> <
>>>>> http://www.jfrog.com/confluence/display/RTF/User+Plugins#UserPlugins-PluginExecutionPoints
>>>>> >
>>>>> ' event; You can refer to some basic plugin examples in our Public
>>>>> GitHub
>>>>> <https://github.com/JFrogDev/artifactory-user-plugins> .
>>>>>
>>>>> b. If you want to run this search manually, you could setup your
>>>>> TeamCity
>>>>> build to add properties to all deployed Artifacts, please refer to this
>>>>> documentation
>>>>> <
>>>>> http://www.jfrog.com/confluence/display/RTF/TeamCity+Artifactory+Plug-in#TeamCityArtifactoryPlug-in-AttachingSearchableParameterstoBuild-InfoandtoPublishedArtifacts
>>>>> >
>>>>> , this will enable you later to search Artifactory for artifacts with
>>>>> this
>>>>> specific property by using the ' Property Search
>>>>> <
>>>>> http://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-PropertySearch
>>>>> >
>>>>> ' REST query.
>>>>>
>>>>> Hope this helps,
>>>>> Itamar.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://forums.jfrog.org/Getting-the-URLs-of-the-published-artifacts-of-a-TC-build-tp7579747p7579755.html
>>>>> Sent from the Artifactory - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Put Bad Developers to Shame
>>>>> Dominate Development with Jenkins Continuous Integration
>>>>> Continuously Automate Build, Test & Deployment
>>>>> Start a new project now. Try Jenkins in the cloud.
>>>>> http://p.sf.net/sfu/13600_Cloudbees
>>>>> _______________________________________________
>>>>> Artifactory-users mailing list
>>>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=7579762&i=3>
>>>>> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>> *Ittai Zeidman*
>>>>
>>>>
>>>>
>>>> Cell: 054-6735021
>>>>
>>>> 40 Hanamal street, Tel Aviv, Israel
>>>>
>>>>
>>>> <http://www.wix.com>
>>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> *Ittai Zeidman*
>>>
>>>
>>>
>>> Cell: 054-6735021
>>>
>>> 40 Hanamal street, Tel Aviv, Israel
>>>
>>>
>>> <http://www.wix.com>
>>>
>>
>>
>>
>> --
>>
>>
>> *Ittai Zeidman*
>>
>>
>>
>> Cell: 054-6735021
>>
>> 40 Hanamal street, Tel Aviv, Israel
>>
>>
>> <http://www.wix.com>
>>
>> ------------------------------------------------------------------------------
>>
>> Put Bad Developers to Shame
>> Dominate Development with Jenkins Continuous Integration
>> Continuously Automate Build, Test & Deployment
>> Start a new project now. Try Jenkins in the cloud.
>> http://p.sf.net/sfu/13600_Cloudbees
>> _______________________________________________
>> Artifactory-users mailing list
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=7579762&i=4>
>> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://forums.jfrog.org/Getting-the-URLs-of-the-published-artifacts-of-a-TC-build-tp7579747p7579762.html
>> To start a new topic under Artifactory - Users, email
>> [email protected]
>> To unsubscribe from Artifactory, click
>> here<http://forums.jfrog.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2380776&code=c2hheWJAamZyb2cuY29tfDIzODA3NzZ8MTU0NDg2MTQ3OA==>
>> .
>> NAML<http://forums.jfrog.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
> --
> View this message in context:
> http://forums.jfrog.org/Getting-the-URLs-of-the-published-artifacts-of-a-TC-build-tp7579747p7579765.html
> Sent from the Artifactory - Users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users