0

In SVN, multiple projects are organized under "trunk". During migration, these projects ended up under "Master" in Stash. I have to configure Jenkins to build one of these projects within master.

The Git plugin for Jenkins requests the Repo URL along with an optional branch name. However, this doesn't apply to the current situation. The project is not a branch on its own.

This is how the master looks like. How do I go about the configuration on Jenkins for this case? I have been able to build projects when they were at the master level.

Stash Master Structure

Serendipity
  • 1,015
  • 1
  • 10
  • 19
  • In Git the master is a branch which is created by default. So you have misused the concept of folders in SVN...the "branch" trunk should contain the project you would like to build. That is your problem. You need to reorganize the structure. – khmarbaise May 13 '15 at 07:10
  • I understand what you're saying, but this is a migration project. We are simply migrating code from SVN to Git and keeping them synchronized. Given that this is an inherited problem (in terms of structure), is there a workaround? – Serendipity May 13 '15 at 07:13
  • If I understand the question correctly, as a workaround you can setup "SVN Mirror" plugin to translate the SVN repository not into one but into several Git projects: project1.git (trunk/project1 -> master), project2.git (trunk/project2 -> master)... Is it the way you would prefer? – Dmitry Pavlenko May 13 '15 at 09:26
  • @DmitryPavlenko On hindsight, I wish that was how the migration was done. But this is how *inheritance* works :P. I have to work with what I have :) – Serendipity May 13 '15 at 10:29

1 Answers1

1

You can setup different jobs to build different projects, even though all of them will checkout your full repository on master branch with all other projects. If you put your whole repo in config, it doesn't mean that Jenkins will build ALL projects.

The only issue is disk space, every job will contain all projects, but that's how it is. You can't checkout specific folder using git plugin in Jenkins.

kirill-a
  • 567
  • 5
  • 14
  • That seems to be one glaring difference in how SVN works vs. Git. That SVN can basically allow you to have any structure and yet provide access at any level. Assuming there is no other workaround, I will accept this answer, though, I will try and get this migration re-done by the powers that be. – Serendipity May 13 '15 at 10:31