How to have Jenkins ignore certain files when checking for change?

£可爱£侵袭症+ 提交于 2019-12-12 14:12:26

问题


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?


回答1:


Glad that worked for you! Reposting as requested:

My guess is it has to do with the .*/ parts. Have you tried it with just .*\.txt?

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.



来源:https://stackoverflow.com/questions/6215276/how-to-have-jenkins-ignore-certain-files-when-checking-for-change

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