SVN to Hudson/Jenkins - Repository Hooks

While you can set Hudson/Jenkins to poll SVN at specific times an alternative is to let SVN inform Hudson when a new change has been committed to the repository. Requirements: You will need access to the server that hosts your SVN repository. You have a project setup and configured in Hudson. Adding the SVN Plugin The following Hudson plugin is installed, version 1.20 for this example. From the Hudson Console: Click Manage Hudson-Manage Plugins Ensure the Subversion Plugin is added. Adding the SVN Hook to SVN Once the plugin has been added its time to update the SVN hook. Using a text editor, VM or VIM edit the "post-commit" file in your SVN repository hooks directory. An example based on the "Oracle Virutal Developer Days VM" Repository directory: /home/oracle/labs/Dev_labs/svn_repos/otnvdd/hooks File: post-commit An sample "post-commit" file: Verify your changes: Once you have the SVN hook in place, its time to make a change ...