Jenkins Git插件包含不工作的区域 [英] Jenkins Git plugin included regions not working

查看:124
本文介绍了Jenkins Git插件包含不工作的区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法通过Git插件获得包含区域功能在Jenkins中工作。我希望只有在他的目录发生变化时才能创建一份工作。示例:只有在 GIT_ROOT / tools / mytool / 下发生更改时才应构建项目mytool。我在包含区域字段中尝试了几种正则表达式:

  /tools/mytool/.* 
工具/ mytool /.*
^ tools / mytool /.*

使用任何这些正则表达式结果是一样的:每次提交更改时,mytool都会构建 - 无论在哪里。我也以同样的方式尝试了排除的区域 - 也没有工作。我做错了什么?

解决方案

对于我来说,它开始工作时检查强制使用工作区轮询管理 - 附加行为。闻起来像一个bug - 有几个开放的关于git插件的包含/排除区域功能。



编辑:更新jenkins和git插件后停止工作。原因可能是:

https ://issues.jenkins-ci.org/browse/JENKINS-20607



我正在考虑转向这种方法这里


I cannot get the "included regions" feature to work in Jenkins with the Git plugin. I want a job only to be built when there a changes in "his" directory. Example: the project mytool should only be build when there are changes under GIT_ROOT/tools/mytool/. I tried several forms for the regex in the included regions field:

 /tools/mytool/.*
 tools/mytool/.*
 ^tools/mytool/.*

With any of these regexes the result is the same: mytool builds every time a change is commited - no matter where. I also tried the excluded regions the same way - also not working. What am I doing wrong?

解决方案

For me it started working when checking "Force polling using workspace" under "Source-Code-Management - Additional Behaviours" in the job config. Smells like a bug - there are several open regarding the included/excluded regions feature of the git plugin.

EDIT: it stopped working after updating jenkins and the git plugin. The cause is probably:

https://issues.jenkins-ci.org/browse/JENKINS-20607

I am thinking of moving to this method here

这篇关于Jenkins Git插件包含不工作的区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆