Created
December 16, 2011 21:35
-
-
Save jorgenpt/1488106 to your computer and use it in GitHub Desktop.
Fingerprinting code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FingerprintMap map = Hudson.getInstance().getFingerprintMap(); | |
Map<String,String> fingerprints = new HashMap<String, String>(); | |
FilePath[] list = srcDir.list(expandedFilter); | |
for (FilePath file : list) { | |
String digest = file.digest(); | |
map.getOrCreate(null, file.getName(), digest).add(build); | |
fingerprints.put(file.getName(), digest); | |
} | |
// add action | |
FingerprintAction fa = build.getAction(FingerprintAction.class); | |
if (fa != null) fa.add(fingerprints); | |
else build.getActions().add(new FingerprintAction(build, fingerprints)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment