Jenkins Branch Specifier Not Being Obeyed

混江龙づ霸主 提交于 2019-12-12 19:40:43

问题


I have a Jenkins build configured to pull from a Gitlab repo.

I have specified in the build config, branch specifier to only pull from one specific branch:

Branch Specifier (blank for 'any'): origin/development

Yet regardless of which branch a commit is pushed to, the build still triggers and pulls the committed branch and builds it.

Am I misunderstanding exactly what the branch specifier is supposed to do? I want to only build when a certain branch is committed to.

I've also tried the following branch specifiers with the same results:

development
*/development
refs/head/development

回答1:


I figured out the issue (sort of).

Under the Build Triggers option, I specified to only match certain branches.

Filter Branch By Regex: development




回答2:


Same, whatever I put in "branch specifier" : master. But push on every Git branches still to trigger a build. (And the worst thing is that it don't only build sources from master).

Under "Comment for triggering a build" -> button advanced : "Filter branches by name" : I wrote "master" and saved.

Now only push on master trigger a build.



来源:https://stackoverflow.com/questions/38423612/jenkins-branch-specifier-not-being-obeyed

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