Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Hudson to build RPM packages

Tags:

hudson

rpm

I've a C project set up in Hudson doing nighly builds, i've also an .rpm spec file used for creating rpms from these sources.

Does anyone have any experience on how to build rpms out of all this using Hudson ?

Right now the only solution I see is to set up a job running a script that checks svn exports the sources ,creates a tarball and does the whole rpm build. This doesn't seem to integrate well with Hudson - e.g. how do I collect the artifacts ?

like image 723
leeeroy Avatar asked Feb 09 '10 22:02

leeeroy


People also ask

Is RPM open source?

RPM Package Manager (RPM) (originally Red Hat Package Manager, now a recursive acronym) is a free and open-source package management system.

What is build RPM?

The BUILD directory is used during the build process of the RPM package. This is where the temporary files are stored, moved around, etc. The RPMS directory holds RPM packages built for different architectures and noarch if specified in . spec file or during the build.


1 Answers

Not sure if I've got a very good answer to your question.

This has worked for me, but feels overweight for your needs.

I've had a decent amount of success with this by using the maven rpm plugin http://mojo.codehaus.org/rpm-maven-plugin/ basically a DSL for creating spec files, laying out sources, etc.

The upside is a maven artifact that hudson can more easily track.

I've added a little groovy script in the maven build (http://docs.codehaus.org/display/GMAVEN/Executing+Groovy+Code) for my needs at the end to auto update a yum repository that hosts the builds, but in your situation, I'd probably use the script before the rpm plugin is used to call make.

Honestly, I feel the above solution is a bit weighty, mostly due to the verbosity of doing scripting in maven, but it does work, and for us, with a bunch of java developers who know maven, works well.

like image 198
JoshMahowald Avatar answered Oct 01 '22 18:10

JoshMahowald