You have to do a few things to build exactly each revision:
- add a REVISION string parameter to your job
- append the ${REVISION} parameter to the repository URL,
eg: https://server/path/myproject${REVISION}
- set the name of the local folder to 'myproject' (see previous example), because the REVISION variable is only expanded in the URL, but when creating the folder, Hudson will not expand it, resulting in a folder named: 'myproject${REVISION}'
- trigger the parameterized build from the post-commit hook, like that:
/usr/bin/wget \
--auth-no-challenge \
--no-check-certificate \
--user=me \
--password=mypasswd \
https: //server/path/job/jobname/buildWithParameters?delay=0sec\&REVISION=%40$REV \
-O /dev/null
If you want to trigger a build manually, you have two possibilities:
- if you want to build HEAD revision, you must leave the REVISION parameter empty
- if you want to build a specific revision, you have to enter @NNN (eg: @1234).
The 'at sign' is very important because all this trick relies on the fact that Subversion plugin interprets URL@NNN as 'get revision NNN from repository at URL'. If you forget the @, Subversion will just say it can't find folder https: //server/path/myprojectNNN. That's also why you have to put %40 between REVISION= and $REV in the wget command, %40 is the escaped character for @.