Automatic tags from meaningful build numbers

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

Automatic tags from meaningful build numbers

Rob Oxspring
Hi,

I've been on the lookout for an Anthill replacement for a while and first
impressions of hudson look promising. After a (very) brief play with the
hudson gui I don't see any facility to control build numbers or create tags
in the SCM system, both of which have been an integral part of my workflow
previously. For example I'd like to be able to specify that the build number
is "product-4.3.5.509" and have hudson automatically increment that to
"product-4.3.5.510" as needed and to use that string to tag the result in
subversion.
So, is this supported in hudson at present? If not, then how much work would
it be to implement?

Thanks,

Rob

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Automatic tags from meaningful build numbers

Kohsuke Kawaguchi
Administrator
Rob Oxspring wrote:

> Hi,
>
> I've been on the lookout for an Anthill replacement for a while and first
> impressions of hudson look promising. After a (very) brief play with the
> hudson gui I don't see any facility to control build numbers or create tags
> in the SCM system, both of which have been an integral part of my workflow
> previously. For example I'd like to be able to specify that the build number
> is "product-4.3.5.509" and have hudson automatically increment that to
> "product-4.3.5.510" as needed and to use that string to tag the result in
> subversion.
The build number is available to the build as the environment variable,
so from there it's up to you to create a string like
"product-4.3.4.$BUILD_NUMBER"

Creating a tag would basically just amounts to add the following one
line at the end of your build:

   svn cp . http://path/to/my/svn/repo/tags/$BUILD_NUMBER

Hudson also records the SVN revision number for each build, so you don't
necessarily need to create a tag --- if you want to grab the workspace
for a particular build, you can come to Hudson, see the revision number,
and use svn -r to check out.

By using the remote API, you can even automate the retrieval of the
revision number.


If this is a sufficiently common request, though, it would be worth
packaging this into a plugin. I don't think that would be particularly
difficult. Anyone interested in writing this?

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment