问题
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