简体   繁体   English

jenkins multibranch jenkinsfile SVN结账

[英]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 svn branch] \\ build文件夹中的Jenkins文件,它将代码检出到从属节点并构建。

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. 我的多分支项目正确地找到了分支,但它检查了master上的整个svn分支只是为了读取jenkins文件,而不是只检查[my svn branch] \\ build文件夹的jenkinsfile本身。

This is a major problem because of storage and performance, are there any solutions for that? 由于存储和性能,这是一个主要问题,有什么解决方案吗?

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. 在'include'字段中的multibranch管道配置字段类型:branches / * / build(我假设你在文件夹'branches'中有所有svn分支,你的build文件夹的url是这样的:svn_url / branches / my_new_branch / build)然后它将仅扫描每个分支中的构建文件夹。

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, ie: Include: trunk/build, trunk/other_build, branches/*/build, branches/*/other_build But more clean approach is to get only one build per multibranch pipeline 警告 - 更改该配置属性后,您的multibranch管道只会覆盖'build',如果您想索引其他构建文件夹,您可以在该属性中列出它们,即:Include:trunk / build,trunk / other_build,branches / * / build,branches / * / other_build但更干净的方法是每个multibranch管道只能获得一个构建

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM