Suggestion for publishing 'pure' RPM's to Artifactory Pro YUM repository using Gradle

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Suggestion for publishing 'pure' RPM's to Artifactory Pro YUM repository using Gradle

DALDEI
I am using Gradle and the ospackage plugin to build RPM's
I want to deploy these to Artifactory Pro (online version)
I have gotten the Artifactory Gradle Publishing plugin to work - but no matter what I do
it insists on publishing the .ivy or .pom files.
As far as I can tell these have no use at all on a pure YUM Artifactory repository - and clutter up the the directory structure.

I can do publishing directly via REST (I have a working script that does this) but I like the build info features and there is value in using the gradle plugin as part of the build process.

Any suggestions on this ?
Q) Any way to disable the publishing of the ivy.xml or .pom files ?
( I have tried a LOT of things but Im sure there are a million ways)

Q) Is there any value at all in having the IVY/POM files in a pure YUM Repostitory (which otherwise contains ONLY .rpm's no jars,wars etc) ?  

Q) Is there any real *harm* having the 'cruft' of unneeded and unwanted files (ivy/pom) in a pure YUM repository ?  It seems 'really wrong' to me to have them, and particularly annoying that its so difficult or unobvious how to avoid them -  but perhaps the pragmatic solution is to ignore them and just let the plugin do its thing ? --- OR if there is harm - I need to figure out how to configure the plugin differently, or bypass it with lower level scripts..

 
Related Question)   I have found no effect (good or bad) of the "Layout" in a YUM repository -
Is the Layout used *at all* for YUM repositories ?  This is completely neglected in the docs,  
and in the Admin GUI there is no indication if layouts have any use, harm, or otherwise different
for YUM repositories - you can set the same options, nothing is disabled or documented differently -
yet they seem to have no affect.  
I *think* this is that YUM queries do not use the same metadata as Maven or IVY queries - instead
only use the generated YUM metadata.   So layouts are never actually  used.
Anyone with any insight into this appreciated.
If I can figure out the current behaviour vs desired behavior then I can write it up to JFrog as a enhancement/bug request - but as of now I cant tell whats going on.


Reply | Threaded
Open this post in threaded view
|

Re: [#29318] Suggestion for publishing 'pure' RPM's to Artifactory Pro YUM repository using Gradle

JFrog Support
Hi David,

Thank you for contacting us.

First, regarding having the Pom/Ivy files as part of the Yum repo, it does look like in most cases there is no need for that (it is not part of the rpm convention). As part of our Gradle-Artifactory documentation, appears two default values for publishing Pom and Ivy files. These values default to ‘True’ but can be changed. Please search for “publishPom” and “publishIvy” in this section of the wiki.
Please let us know if we misunderstood this part of your inquiry.
Also, we completely understand your desire to have the BuildInfo; its merits are self evident from our point of view.

About this question:
“Q) Is there any value at all in having the IVY/POM files in a pure YUM
Repostitory (which otherwise contains ONLY .rpm’s no jars,wars etc) ?”

Well, in cases that the RPM was built using the appropriate Maven plugin then there might be a value keeping the pom which produced the RPM.

About This question:
“Q) Is there any real harm having the ‘cruft’ of unneeded and unwanted
files (ivy/pom) in a pure YUM repository ? It seems ‘really wrong’ to me to
have them, and particularly annoying that its so difficult or unobvious how
to avoid them – but perhaps the pragmatic solution is to ignore them and
just let the plugin do its thing ? - OR if there is harm – I need to
figure out how to configure the plugin differently, or bypass it with lower
level scripts..”

[A] As mentioned at the beginning, there are two “switches” for the Pom/Ivy production as part of the plugin.

Now, regarding the repository layout question, from Artifactory’s perspective, layouts are used for features such as “Delete Versions” ,“Snapshot Cleanup”, some searches, and other options. As you have noticed a. the layouts are not enforced with respect to deployment and b. in most cases even a customised layout will not fit a “regular” Yum repository. Of course you are also correct about Yum using only its own metadata and not the Maven/Ivy ones.

That being said, If you feel that our documentation is lacking, please sign up for our Jira system (publicly open) and open improvement issues for our documentation (or any other aspect which you may find lacking from your point of view). Please try to be as detailed as possible with respect to the issue and how you think it can be improved. Once you open these Jira issues, please provide us with the relevant links so we can associate them with this thread.

We hope that we have addressed your enquiry as intended. Please feel free to contact us for any further clarification or assistance.

Respectfully Sent,
Eran
JFrog Support




On Mon, 22 Jun at 4:08 AM , artifactory-users <[hidden email]> wrote:
I am using Gradle and the ospackage plugin to build RPM’s
I want to deploy these to Artifactory Pro (online version)
I have gotten the Artifactory Gradle Publishing plugin to work – but no
matter what I do
it insists on publishing the .ivy or .pom files.
As far as I can tell these have no use at all on a pure YUM Artifactory
repository – and clutter up the the directory structure.

I can do publishing directly via REST (I have a working script that does
this) but I like the build info features and there is value in using the
gradle plugin as part of the build process.

Any suggestions on this ?
Q) Any way to disable the publishing of the ivy.xml or .pom files ?
( I have tried a LOT of things but Im sure there are a million ways)

Q) Is there any value at all in having the IVY/POM files in a pure YUM
Repostitory (which otherwise contains ONLY .rpm’s no jars,wars etc) ?

Q) Is there any real harm having the ‘cruft’ of unneeded and unwanted
files (ivy/pom) in a pure YUM repository ? It seems ‘really wrong’ to me to
have them, and particularly annoying that its so difficult or unobvious how
to avoid them – but perhaps the pragmatic solution is to ignore them and
just let the plugin do its thing ? - OR if there is harm – I need to
figure out how to configure the plugin differently, or bypass it with lower
level scripts..


Related Question) I have found no effect (good or bad) of the “Layout” in
a YUM repository –
Is the Layout used at all for YUM repositories ? This is completely
neglected in the docs,
and in the Admin GUI there is no indication if layouts have any use, harm,
or otherwise different
for YUM repositories – you can set the same options, nothing is disabled or
documented differently –
yet they seem to have no affect.
I think this is that YUM queries do not use the same metadata as Maven or
IVY queries – instead
only use the generated YUM metadata. So layouts are never actually used.
Anyone with any insight into this appreciated.
If I can figure out the current behaviour vs desired behavior then I can
write it up to JFrog as a enhancement/bug request – but as of now I cant
tell whats going on.







View this message in context: http://forums.jfrog.org/Suggestion-for-publishing-pure-RPM-s-to-Artifactory-Pro-YUM-repository-us…
Sent from the Artifactory – Users mailing list archive at Nabble.com.

———————————————————————————————————————
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users
29318

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users
Reply | Threaded
Open this post in threaded view
|

Re: Suggestion for publishing 'pure' RPM's to Artifactory Pro YUM repository using Gradle

DALDEI
In reply to this post by DALDEI
Thanks for the response.  I have tried all the options documented I could find to disable the Pom and Ivy metadata but they did nothing.
The closest I got was disabling the task that creates generates the Ivy.xml file - that worked too well.
The artifactory publish task then issued an error that it depended on the Ivy metadata task having run and aborted (publishing nothing).

So as far as I can tell there is no direct way to 'publish' RPM's to a Yum repository using the artifactory publish plugin without  the Pom or Ivy files being sent as well.
I did run across a post (but lost it) that had a workaround for something similar by hooking in just at the right point and deleting files from the artifact property.   But the complexity of figuring that out and implementing seems directly opposed to the reason I am trying to use the plugin in the first place.

Thanks for clearing up the issues - for now I am configuring the Yum repo to 'hide' the extra useless ivy files by setting the depth > 0 and putting the ivy files in a sibling directory - they dont seem to be hurting anything ( just annoying ).

When I get a chance I will write up a Jiri issue - although it is still quite challenge to figure out exactly the expected behaviors is in enough detail to document how I believe it is incorrect.


Reply | Threaded
Open this post in threaded view
|

Re: Suggestion for publishing 'pure' RPM's to Artifactory Pro YUM repository using Gradle

Alex
Hi David

You can configure the artifactory closure to not publish the pom and ivy files by adding the default closure:

 defaults {
 publishConfigs('published')
publishPom = false //Publish generated POM files to Artifactory (true by default)
publishIvy = false ////Publish generated Ivy descriptor files to Artifactory (true by default).
 }
This will prevent the deployment of the pom and ivy files. Also, you can add:

def f1 = file("test.rpm")
rootProject.artifacts {
println "artifacts"
println f1.toString()
println f1.getName()
 //File = Path to the file, GetName= Will get the filename for this example test.rpm and the type is “rpm”
published file: f1, name: f1.getName(), type: 'rpm', classifier: "classifier"
 
}

to publish an RPM file named “test”.

Hope this helps,
Alex
Reply | Threaded
Open this post in threaded view
|

Re: Suggestion for publishing 'pure' RPM's to Artifactory Pro YUM repository using Gradle

DALDEI
Thanks Alex, for the suggestions, but they dont work for me.

My defaults are (and have been)
  defaults {
        publishBuildInfo = true   //Publish build-info to Artifactory (true by default)
        publishArtifacts = true   //Publish artifacts to Artifactory (true by default)
        publishPom = false   //Publish generated POM files to Artifactory (true by default).
        publishIvy = false  //Publish generated Ivy descriptor files to Artifactory (true by default)
        publications( 'build' )
    }

Still I get the Ivy file published:

$ gradle artifactoryPublish
:bootstrap:buildRpm UP-TO-DATE
:bootstrap:generateDescriptorFileForBuildPublication
:bootstrap:artifactoryPublish
Deploying artifact: http://xxx.artifactoryonline.com/xxx/yum-nexstra-local/ivy/dev/xxx-bootstrap-0.4-ivy.xml
Deploying artifact: http://xxx.artifactoryonline.com/xxx/yum-nexstra-local/dev/xxx/bootstrap/xxx-bootstrap-0.4-noarch.rpm
Deploying build descriptor to: http://xxx.artifactoryonline.com/nexstra/api/build
Build successfully deployed. Browse it in Artifactory under http://xxx.artifactoryonline.com/xxx/webapp/builds/rpms/2235/2015-06-23T11:38:09.771-0400/

BUILD SUCCESSFUL



I tried the other code and it gives the error:

> Could not find method published() for arguments [{file=build/distributions/nexstra-bootstrap-0-4.noarch.rpm, name=nexstra-bootstrap-0-4.noarch.rpm, type=rpm, classifier=classifier}] on project ':bootstrap'.

This may be because Im using publications not configurations ...
Im creating the RPM with the ospackage plugin and that's what it sets up.

Reply | Threaded
Open this post in threaded view
|

Re: Suggestion for publishing 'pure' RPM's to Artifactory Pro YUM repository using Gradle

Nihal Choudhary
Hi David,

We are working on this issue and will get back to you as soon as we have an update.

Best Regards,
Nihal
JFrog Support

On Tue, Jun 23, 2015 at 8:39 AM, DALDEI <[hidden email]> wrote:
Thanks Alex, for the suggestions, but they dont work for me.

My defaults are (and have been)
  defaults {
        publishBuildInfo = true   //Publish build-info to Artifactory (true
by default)
        publishArtifacts = true   //Publish artifacts to Artifactory (true
by default)
        publishPom = false   //Publish generated POM files to Artifactory
(true by default).
        publishIvy = false  //Publish generated Ivy descriptor files to
Artifactory (true by default)
        publications( 'build' )
    }

Still I get the Ivy file published:

$ gradle artifactoryPublish
:bootstrap:buildRpm UP-TO-DATE
:bootstrap:generateDescriptorFileForBuildPublication
:bootstrap:artifactoryPublish
Deploying artifact:
http://xxx.artifactoryonline.com/xxx/yum-nexstra-local/ivy/dev/xxx-bootstrap-0.4-ivy.xml
Deploying artifact:
http://xxx.artifactoryonline.com/xxx/yum-nexstra-local/dev/xxx/bootstrap/xxx-bootstrap-0.4-noarch.rpm
Deploying build descriptor to:
http://xxx.artifactoryonline.com/nexstra/api/build
Build successfully deployed. Browse it in Artifactory under
http://xxx.artifactoryonline.com/xxx/webapp/builds/rpms/2235/2015-06-23T11:38:09.771-0400/

BUILD SUCCESSFUL



I tried the other code and it gives the error:

> Could not find method published() for arguments
> [{file=build/distributions/nexstra-bootstrap-0-4.noarch.rpm,
> name=nexstra-bootstrap-0-4.noarch.rpm, type=rpm, classifier=classifier}]
> on project ':bootstrap'.

This may be because Im using publications not configurations ...
Im creating the RPM with the ospackage plugin and that's what it sets up.





--
View this message in context: http://forums.jfrog.org/Suggestion-for-publishing-pure-RPM-s-to-Artifactory-Pro-YUM-repository-using-Gradle-tp7580347p7580351.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users
Reply | Threaded
Open this post in threaded view
|

RE: Suggestion for publishing 'pure' RPM's to Artifactory Pro YUM repository using Gradle

DALDEI

Thanks !

 

 

----------------------------------------

David A. Lee

[hidden email]

CTO, Nexstra Inc.

http://www.nexstra.com

 

From: Nihal Choudhary [via Artifactory] [mailto:ml-node+[hidden email]]
Sent: Wednesday, June 24, 2015 2:41 AM
To: David Lee
Subject: Re: Suggestion for publishing 'pure' RPM's to Artifactory Pro YUM repository using Gradle

 

Hi David,

 

We are working on this issue and will get back to you as soon as we have an update.

 

Best Regards,

Nihal

JFrog Support

 

On Tue, Jun 23, 2015 at 8:39 AM, DALDEI <[hidden email]> wrote:

Thanks Alex, for the suggestions, but they dont work for me.

My defaults are (and have been)
  defaults {
        publishBuildInfo = true   //Publish build-info to Artifactory (true
by default)
        publishArtifacts = true   //Publish artifacts to Artifactory (true
by default)
        publishPom = false   //Publish generated POM files to Artifactory
(true by default).
        publishIvy = false  //Publish generated Ivy descriptor files to
Artifactory (true by default)
        publications( 'build' )
    }

Still I get the Ivy file published:

$ gradle artifactoryPublish
:bootstrap:buildRpm UP-TO-DATE
:bootstrap:generateDescriptorFileForBuildPublication
:bootstrap:artifactoryPublish
Deploying artifact:
http://xxx.artifactoryonline.com/xxx/yum-nexstra-local/ivy/dev/xxx-bootstrap-0.4-ivy.xml
Deploying artifact:
http://xxx.artifactoryonline.com/xxx/yum-nexstra-local/dev/xxx/bootstrap/xxx-bootstrap-0.4-noarch.rpm
Deploying build descriptor to:
http://xxx.artifactoryonline.com/nexstra/api/build
Build successfully deployed. Browse it in Artifactory under
http://xxx.artifactoryonline.com/xxx/webapp/builds/rpms/2235/2015-06-23T11:38:09.771-0400/

BUILD SUCCESSFUL



I tried the other code and it gives the error:

> Could not find method published() for arguments
> [{file=build/distributions/nexstra-bootstrap-0-4.noarch.rpm,
> name=nexstra-bootstrap-0-4.noarch.rpm, type=rpm, classifier=classifier}]
> on project ':bootstrap'.

This may be because Im using publications not configurations ...
Im creating the RPM with the ospackage plugin and that's what it sets up.





--
View this message in context: http://forums.jfrog.org/Suggestion-for-publishing-pure-RPM-s-to-Artifactory-Pro-YUM-repository-using-Gradle-tp7580347p7580351.html

Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

 


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users


To unsubscribe from Suggestion for publishing 'pure' RPM's to Artifactory Pro YUM repository using Gradle, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

RE: Suggestion for publishing 'pure' RPM's to Artifactory Pro YUM repository using Gradle

itamarb
Hi David,

You should verify that you don't have any other settings that contradict this on you publications.

If this is not the case, could you please send us the full build.gradle file to our support email?

Regards,
Itamar
JFrog Support