String promotionKey = tokens[1];
String fileName = tokens[2];
String treeFilter = "fingerprint[fileName,hash]";
BuildInfo buildInfo;
try {
buildInfo = client.findPromotedBuild(jobKey, promotionKey, treeFilter);
if (buildInfo == null) {
return null;
}
} catch (JenkinsException e) {
throw new OpsException("Error communicating with Jenkins", e);
}
FingerprintInfo found = null;
List<FingerprintInfo> fingerprints = buildInfo.getFingerprints();
for (FingerprintInfo fingerprint : fingerprints) {
if (fileName.equals(fingerprint.getFileName())) {
found = fingerprint;
}
}