Is it possible to replace the entire Repository Url with a parameterized string in Hudson/Jenkins?

AHungerArtist picture AHungerArtist · Apr 22, 2011 · Viewed 13.6k times · Source

In Hudson/Jenkins, is it possible to replace the entire string in the Subversion Module Repository URL with a String parameter? I don't want to just replace just the version or anything like that, I want to replace the entire url.

So, when I run the build, I'd get a prompt for the URL and I'd put something like "http://scm.work.corp/svn/com.work.package/tags/project-4.0.0.RELEASE" and it would check that out and build it.

Being able to substitute the "com.work.package" and "project-4.0.0.RELEASE" parts would be just as acceptable. I basically want it to be one job that can build any release.

Answer

Jason Swager picture Jason Swager · Apr 22, 2011

Yes, you can. But you can't have Jenkins/Hudson monitor the SVN for changes. Even with parameters in place, that didn't work for me properly. But if you monitor the SVN from a job that does not have the Repository URL parameterized, have that job trigger a downstream job passing the entire Repository URL as a parameter, then have the downstream job use the Repository URL parameter, then it seems to work.

This is what we do for our build stuff. We have one job that can build the product from SVN, based on the Repository URL that you start the job with. Then we have a number of trigger jobs that monitor certain branches; when a change is noted, the startup the build job and pass their URL to it.