Exclude directory during jenkins checkout

断了今生、忘了曾经 提交于 2019-12-10 13:08:32

问题


I have 20 directories under trunk

/trunk/a1
/trunk/a2
/trun/a3
..
..
/trunk/a20

How to exclude (not include) some (arbitrary directories during Jenkins checkout. For example, I want to have all the directories under trunk except /trunk/a3/b1 How to do this?

I already found an answer in SVN checkout ignore folder but this is not possible under Jenkins. Need a much simpler solution where I don't know the number of directories under trunk except the one I want to exclude.

Also how to add a custom svn checkout.Let's say I want to execute svn command line tool to do the checkout?


回答1:


I know that's much to late, but maybe this can be useful: https://issues.jenkins-ci.org/browse/JENKINS-25273

Important: This version contains quick and dirty fixes! In our tests it was stable without errors but to avoid problems save the Jenkins environment before testing it.

Install: Just delete the subversion folder and files in your Jenkins - plugin folder and replace them with the subversion.hpi file from the ticket. You have to create also an empty file named subversion.hpi.pinned in your plugin folder to provide that the new plugin wont be overwritten by the original one.




回答2:


Since you do update (and not complete checkout) you can do the following: after the initial checkout go to the directory you want to ignore and do svn up --set-depth=empty. The subsequent updates won't update the directory.



来源:https://stackoverflow.com/questions/10319173/exclude-directory-during-jenkins-checkout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!