Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure Jenkins to work with SVN branches

I am currently setting up Jenkins to work with SVN repository. Currently it works fine for the trunk. Now I want to set up Jenkins to take care of newly created branches. I don't want to create a new project manually for every new branch in SVN.

  • Is there already a solution which allowes to use SVN and to create jobs/tasks in Jenkins automatically for every brach created in SVN?
  • How do you use Jenkins with SVN tags/branches?
like image 711
mryvlin Avatar asked Jun 17 '13 11:06

mryvlin


2 Answers

Also check my extend answer if you are not very familiar with jenkins.

It provides a step by step solution with screenshots.

The subversion plugin is installed by default in recent versions(as for Sep 2015).

Then you should configure your project as following:

  1. check "This build is parameterized"
  2. choose "List subverion tags (and more)"
  3. in the name field, set a varaiable name which can be referenced later in the svn url. I choose svnbranch here.
  4. in the Repository URL field, give it your project URL (which needs to contain trunk, branches, and tags)
  5. fill other field as your needs
  6. in source code management, reference the variable defined before in your repository url.

check following screenshots:

enter image description here

enter image description here

like image 148
dezhi Avatar answered Sep 19 '22 12:09

dezhi


The Subversion plugin should include a drop-down build parameter option. You can include your base repository and then select either the branches, tags, or trunk.

Check this out: How to configure a single Jenkins job to make the release process from trunk or branches?

And more info here: https://issues.jenkins-ci.org/browse/JENKINS-10678

like image 44
Chewpers Avatar answered Sep 20 '22 12:09

Chewpers