0

I am a complete newbie to Jenkins - so bear with me! I am sure that info sits somewhere out there, but I am currently still a bit swamped with Jenkins info...

Our project's SVN root contains many more projects than what is actually needed to build the release that I am supposed to create. Jenkins by default seems to check out the HEAD version of ALL projects found under the supplied repository URL. How/where can I specify that it needs to checkout (and later monitor) about 10 relevant projects only (and not all that are found in our SVN)?

I tried to specify that using Configure => Source Code Management => Advanced => Included Regions but apparently that's a different pair of shoes.

NotAgain
  • 1,927
  • 3
  • 26
  • 42
mmo
  • 3,897
  • 11
  • 42
  • 63
  • Adding this as a comment since this is not really answer to your question. In cases like this when you have 10 relevant projects which you are interested in, it is better to go for push model rather than the pull model. Get the SVN administrator to configure a post commit hook for you. http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/ More info: http://stackoverflow.com/questions/12794568/how-to-configure-git-post-commit-hook – NotAgain Apr 13 '15 at 05:22

2 Answers2

1

If you know what are the projects you want (exact URLs), you can checkout each one as a separate SCM using the Multiple SCMs Plugin.
You just put the URL of the project's root as a new SCM entry.
I use it with Git and Mercurial and it works well. Didn't try with SVN, but it's supported so I assume the behavior is similar.

I hope this helps.

Eldad Assis
  • 10,464
  • 11
  • 52
  • 78
  • Only came around today to test this. Excellent! This allows me to do exactly what I want! Cheers and thanks for sharing this! – mmo May 18 '15 at 12:17
0

I was unable to get post commit hook configured by the SVN administrators. Hence I took the way around. I monitored the SVN root as you are doing. And the projects of interest were lurking under it at different places. What I did was to get the XML containing the changes. In Jenkins it is possible using curl.

1 - Monitor the changes.

2 - On any changes, get the xml containing the changes.

3 - Parse it and do the necessary if the changes affect your branches of interest and check out what you need using svn command line client in a windows batch script.

Replace the tokens and paste the url to see the changes in XML format:

http://<YourjenkinsInstance>:<portNumber>/job/<YourjobName>/<BuildNumber>/api/xml?pretty=true&tree=changeSet[items[msg,paths[editType,file],commitId]]
NotAgain
  • 1,927
  • 3
  • 26
  • 42