本文整理了Java中hudson.model.Fingerprint.addFor()
方法的一些代码示例,展示了Fingerprint.addFor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fingerprint.addFor()
方法的具体详情如下:
包路径:hudson.model.Fingerprint
类名称:Fingerprint
方法名:addFor
[英]Adds a usage reference to the build.
[中]向生成添加用法引用。
代码示例来源:origin: jenkinsci/jenkins
/**
* @deprecated Use {@link #addFor(hudson.model.Run)}
*/
@Deprecated
public synchronized void add(@Nonnull AbstractBuild b) throws IOException {
addFor((Run) b);
}
代码示例来源:origin: jenkinsci/jenkins
private void record(Run<?,?> build, FilePath ws, TaskListener listener, Map<String,String> record, final String targets) throws IOException, InterruptedException {
for (Record r : ws.act(new FindRecords(targets, build.getTimeInMillis()))) {
Fingerprint fp = r.addRecord(build);
if(fp==null) {
listener.error(Messages.Fingerprinter_FailedFor(r.relativePath));
continue;
}
fp.addFor(build);
record.put(r.relativePath,fp.getHashString());
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* @deprecated Use {@link #addFor(hudson.model.Run)}
*/
@Deprecated
public synchronized void add(@Nonnull AbstractBuild b) throws IOException {
addFor((Run) b);
}
代码示例来源:origin: org.jenkins-ci.plugins/credentials
/**
* Track the usage of credentials in a specific build.
*
* @param build the run to tag the fingerprint
* @param credentials the credentials to fingerprint.
* @param <C> the credentials type.
* @return the supplied credentials for method chaining.
* @since 2.1.1
*/
@NonNull
public static <C extends Credentials> List<C> trackAll(@NonNull Run build, @NonNull List<C> credentials) {
for (Credentials c : credentials) {
if (c != null) {
try {
getOrCreateFingerprintOf(c).addFor(build);
} catch (IOException e) {
LOGGER.log(Level.FINEST, "Could not track usage of " + c, e);
}
}
}
return credentials;
}
代码示例来源:origin: jenkinsci/credentials-plugin
/**
* Track the usage of credentials in a specific build.
*
* @param build the run to tag the fingerprint
* @param credentials the credentials to fingerprint.
* @param <C> the credentials type.
* @return the supplied credentials for method chaining.
* @since 2.1.1
*/
@NonNull
public static <C extends Credentials> List<C> trackAll(@NonNull Run build, @NonNull List<C> credentials) {
for (Credentials c : credentials) {
if (c != null) {
try {
getOrCreateFingerprintOf(c).addFor(build);
} catch (IOException e) {
LOGGER.log(Level.FINEST, "Could not track usage of " + c, e);
}
}
}
return credentials;
}
代码示例来源:origin: jenkinsci/pipeline-maven-plugin
String artifactPathInFingerprintZone = artifactToFingerprint.getKey();
String artifactMd5 = artifactToFingerprint.getValue();
fingerprintMap.getOrCreate(null, artifactPathInFingerprintZone, artifactMd5).addFor(run);
代码示例来源:origin: jenkinsci/copyartifact-plugin
f.addFor(src);
f.addFor(dst);
代码示例来源:origin: jenkinsci/pipeline-maven-plugin
String artifactPathInArchiveZone = artifactToFingerprint.getKey();
String artifactMd5 = artifactToFingerprint.getValue();
fingerprintMap.getOrCreate(run, artifactPathInArchiveZone, artifactMd5).addFor(run);
代码示例来源:origin: jenkinsci/external-workspace-manager-plugin
/**
* Adds the current run to the fingerprint's usages.
*
* @param workspaceId the workspace's id
* @throws IOException if fingerprint load operation fails,
* or if no fingerprint is found for the given workspace id
*/
private void updateFingerprint(String workspaceId) throws IOException {
Fingerprint f = Jenkins.getActiveInstance()._getFingerprint(workspaceId);
if (f == null) {
throw new AbortException("Couldn't find any Fingerprint for: " + workspaceId);
}
Fingerprint.RangeSet set = f.getUsages().get(run.getParent().getFullName());
if (set == null || !set.includes(run.getNumber())) {
f.addFor(run);
f.save();
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
continue;
fp.addFor(build);
record.put(r.relativePath,fp.getHashString());
代码示例来源:origin: jenkinsci/copyartifact-plugin
f.addFor(src);
f.addFor(dst);
内容来源于网络,如有侵权,请联系作者删除!