Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jenkins multibranch jenkinsfile SVN checkout

I have a Jenkinsfile located in [my svn branch]\build folder, and it checks out code to the slave node and builds.

My multi branch project finds the branch correctly, but it checks out the entire svn branch on the master just to read the jenkinsfile instead of checking out just the jenkinsfile itself of just [my svn branch]\build folder.

This is a major problem because of storage and performance, are there any solutions for that?

like image 940
Gilad Baruchian Avatar asked Oct 09 '17 07:10

Gilad Baruchian


1 Answers

In your multibranch pipeline config in 'include' field type: branches/*/build (i assume that you have all svn branches in folder 'branches', and url to your build folder is something like: svn_url/branches/my_new_branch/build) Then it will scan only build folder in each branch.

Warning - after changing that config property your multibranch pipeline will only diacover 'build', if you want to index other build folders, you can list them in that property, i.e.: Include: trunk/build, trunk/other_build, branches/*/build, branches/*/other_build But more clean approach is to get only one build per multibranch pipeline

like image 82
Kuba Samczuk Avatar answered Oct 08 '22 11:10

Kuba Samczuk