How to put a Jenkins installation under control of Subversion:
  • Add some entries to the global ignore list (the “~/.subversion/config” file):
  • global-ignores = builds cobertura lastStable lastSuccessful nextBuildNumber *.log svnexternals.txt workspace
  • Add the following files and directories from the JENKINS_HOME directory to subversion:
    • *.xml (general configuration files)
    • jobs/ (job configuration files)
    • plugins/*.hpi (i.e. excluding the subdirectories
    • users/ (email adresses, personal views etc.)
Using Subversion has some major drawbacks (so I recommend using Git instead):
  • whenever a new job is created, it must explicitly be added using “svn add”
  • likewise, a deleted job must be removed with “svn rm”
  • renaming a job is even more cumbersome:
    1. rename the job at the GUI (which just renames the directory but leaves the SVN metadata, which kind of confuses SVN)
    2. remove the old job from Subversion (“svn rm”)
    3. delete the SVN metadata (the “.svn” directory) from the renamed job
    4. add the renamed job to Subversion again (“svn add”)
As a general hint, don’t use blanks or special chars within the job names (not only because of Subversion, but also the Jenkins URLs look nicer)