Open timja opened 12 years ago
Note that Jira does not have a 'create-fingerprint-plugin' component to track the fingerprint plugin. Issue is https://issues.jenkins-ci.org/browse/JENKINS-14356
Our bug report is https://bugzilla.wikimedia.org/show_bug.cgi?id=38260
Sending you this finger print plugin bug. Might be a core issue though.
Might be related to JENKINS-13165 which is about ant excluding .git directories by default.
Looking at core/src/main/java/hudson/tasks/Fingerprinter.java record() calls
FileSet src = Util.createFileSet(baseDir,targets);
The fix for the dirScanner was:
https://github.com/jenkinsci/jenkins/commit/0725d2765da789e02914deb4893a449eeda6a820
Which added an option to disable the default excludes, aka:
FileSet fs = Util.createFileSet(dir,includes,excludes);
fs.setDefaultexcludes(useDefaultExcludes);
The core/src/main/java/hudson/Util.java createFileSet() method does have an exclude which default to null but does not allow one to disable the useDefaultExcludes.
So I guess this bug is about porting the dirScanner fix to Util.createFileSet().
Moved to core, the Fingerprinter plugin just call the Jenkins core API:
Fingerprinter fingerprinter = new Fingerprinter(this.targets, false);
return fingerprinter.perform(build, launcher, listener);
[Originally related to: JENKINS-20086]
[Originally related to: JENKINS-13165]
Summary:
The fingerprint plugin is no more able to take fingerprint of a "hidden" file such as .git/FETCH_HEAD.
I am assuming it is an issue in Jenkins core, though the plugin might not have reflected a change to how files are detected in core.
How to reproduce:
Install the finger print plugin. Create a simple job. In the workspace directory create a directory '.git' (note the leading dot), create a FETCH_HEAD file in it with some random content.
Add a build step 'fingerprint' files.
In the field "Files to fingerprint" fill in '.git/FETCH_HEAD'.
A red error message is shown:
'.git/FETCH_HEAD' doesn't match anything: even '.git' doesn't exist
The help message give a link to "the workspace", that file browser does show a .git directory containing a FETCH_HEAD file.
Reason:
I have a "child" job fetching several git repositories. I would like it to just fingerprints any FETCH_HEAD files (**/.git/FETCH_HEAD) to have a quick and fast way to track jobs dependencies.
Misc informations:
I am pretty sure it used to work in version 1.431 and was broken with 1.458. Still broken with 1.473.
Originally reported by hashar, imported from: Allow disabling use of default exclude patterns (.git, .svn, etc.) for fingerprinting