如何让 Jenkins 在检查更改时忽略某些文件?
在 CVS 配置的“排除区域”中,我添加了以下内容:
.*/.*/.*\.d
.*/.*/.*\.o
.*/.*/.*\.so
.*/.*/.*\.a
.*/.*/.*\.exe
.*/.*/.*\.obj
.*/.*/.*\.dll
.*/.*/.*\.lib
.*/.*/.*\.txt
.*/.*/.*\.tar
.*/.*/.*\.tar\.gz
应忽略具有上述扩展名的所有文件。然而,Jenkins 仍然基于某个文件夹 ABC 中的文件“build.txt”已更改或 tar.gz 文件之一已更改这一事实来运行构建。如何让詹金斯忽略这些文件?我的正则表达式有问题吗?
In the "Excluded Regions" of the CVS configuration, I have added the following:
.*/.*/.*\.d
.*/.*/.*\.o
.*/.*/.*\.so
.*/.*/.*\.a
.*/.*/.*\.exe
.*/.*/.*\.obj
.*/.*/.*\.dll
.*/.*/.*\.lib
.*/.*/.*\.txt
.*/.*/.*\.tar
.*/.*/.*\.tar\.gz
All files with the above extensions should be ignored. However, Jenkins still runs builds based on the fact that a file "build.txt" in some folder ABC has changed, or the one of the tar.gz files has changed. How to get Jenkins to ignore these files? Is something wrong with my regex?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
很高兴这对你有用!按要求重新发布:
作为实验,您也可以尝试
/.*/.*/.*\.txt
(注意开头额外的/
)。我感觉问题与使用相对文件路径和绝对文件路径有关。Glad that worked for you! Reposting as requested:
Just as an experiment, you might also try
/.*/.*/.*\.txt
(note the extra/
at the beginning). I have a feeling the problem was related to using relative vs. absolute file paths.