问题
I'd like to setup the ability to rebuild from a specific revision. The default would be HEAD and a user could rebuild an old build (that had been removed). I'd still like to leverage all of hudson's reporting regarding SVN etc.
Is there a good way to do this?
回答1:
What I would try. Unfortunately I don't have the time to verify my approach.
A quick way would be to use an parameter and leave a blank if you want to go to head. To check out an older revision, enter "@" plus the revision number as the value for the parameter.
You than just need to add the parameter to the URL for your subversion checkout. I am not sure about the correct syntax. I suspect it is something like ${Parameter_Name}
.
Let us know if this works.
回答2:
Have you tried the Subversion Release Manager plug-in? Sounds like what you're looking for.
回答3:
I made a request: http://issues.hudson-ci.org/browse/HUDSON-4412
but it didn't go anywhere.
The way we're doing it is having the script call SVN.EXE to get the revision we want. You can pass in the revision ID as a parameter to SVN.EXE.
来源:https://stackoverflow.com/questions/1863949/can-a-parameterized-hudson-build-override-the-svn-revision