0

I would like to try jenkins for CI of my project !

For building my project, I need 3 others SVN modules (that contains other project).

for example, my project architecture look like :

- https://scm-svn/myproject/build
   - build subproject 1
   - build subproject 2
   - build subproject 3

- https://scm-svn/myproject/common
   - common subproject 1
   - common subproject 2
   - common subproject 3

- https://scm-svn/myproject/server
   - server subproject 1
   - server subproject 2

- https://scm-svn/mainproject/server
   - main project server 1

main project server 1 contains a build.xml ant file that build the whole project (with the modules) when they are in the same workspace (like eclipse does).

In jenkins, When I use svn module, after each new module, the workspace is cleaned !

So I try to use "clone workspace plugin", I've created a new project each svn module and create a workspace.zip for each projects.

But in the mainproject configuration, how can I configure it to copy/past the others subproject workspace into mainproject's workspace ?

In this way I will be able to execute an ant task in build step for lunching my build.xml

Nymeria
  • 267
  • 4
  • 13

1 Answers1

1

Unfortunately there is an open issue related to exporting using the subversion plugin: https://issues.jenkins-ci.org/browse/JENKINS-1304

You can decide not to use the Subversion plugin and execute "svn export.... command".

Another idea might be to exclude the .svn folder from the checkout (if it will not checkout the .svn folder it'll mimic the same behavior as export)

Good luck!

Dvir669
  • 6,577
  • 1
  • 20
  • 21
  • It do not work, each time jenkins execute new svn command, jenkins also clean current workspace ! I need all the svn repo to be checkouted in the same workspace – Nymeria May 25 '16 at 11:58
  • Can you add a print screen of your Jenkins SCM configuration? the default behavior is not to clean but use the update method. It'll be easier to view the job configuration to pinpoint the problem. – Dvir669 May 25 '16 at 13:29
  • 1
    You can find a screenshoot at this url : http://zupimages.net/up/16/21/d74z.png (In fact, there 4 differents svn url) – Nymeria May 25 '16 at 13:46
  • If you're checking out several repositories to the same local module directory it'll clean the workspace every time. if all configurations for your repositories are checking out to "./" please try what I answered and specify a module folder to each repository. I tried it locally on my system and it worked. – Dvir669 May 25 '16 at 13:52
  • I can specify a module folder for each repo, it will checkout without error, but what I need is : all those repo to be checkouted in the same directory (like eclipse does), otherwise my ant script will not work – Nymeria May 25 '16 at 13:58
  • unfortunately you can only have one .svn folder per workspace, and you can't have several folders that contain the meta-data to be combined. What you're talking about is not CHECKOUT but EXPORT. unfortunately there is an open issue related to it : https://issues.jenkins-ci.org/browse/JENKINS-1304. If you can't find a way to work around it (point the script to different locations instead of the root folder) I would suggest to not use the Subversion plugin and to run svn export .... command. – Dvir669 May 25 '16 at 14:06
  • Another idea might be to exclude the .svn folder from the checkout and to hope it'll work (if it will not checkout the .svn folder it'll mimic the same behavior as export) - not sure it'll work but it's a minute to test. – Dvir669 May 25 '16 at 14:09
  • 1
    can post a reply ? I'll mark it as "answer my question" – Nymeria May 25 '16 at 14:15
  • Thanks - glad it worked out - I've edited my answer. – Dvir669 May 25 '16 at 14:35