本文整理了Java中hudson.model.Run.addOrReplaceAction
方法的一些代码示例,展示了Run.addOrReplaceAction
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Run.addOrReplaceAction
方法的具体详情如下:
包路径:hudson.model.Run
类名称:Run
方法名:addOrReplaceAction
暂无
代码示例来源:origin: jenkinsci/pipeline-maven-plugin
/**
* Synchronize because {@link Run#addOrReplaceAction(hudson.model.Action)} is not thread safe
*/
@Override
public synchronized void process(StepContext context, Element mavenSpyLogsElt) throws IOException, InterruptedException {
Run<?, ?> run = context.get(Run.class);
// we replace instead of because we want to refresh the cache org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport.getGeneratedArtifacts()
run.addOrReplaceAction(new MavenReport(run));
}
代码示例来源:origin: jenkinsci/warnings-ng-plugin
/**
* Creates a new {@link AnalysisResult} and attaches the result in a {@link ResultAction} that is registered with
* the current run.
*
* @return the created result action
*/
ResultAction attachAction() {
logger.log("Attaching ResultAction with ID '%s' to run '%s'.", getId(), run);
ResultSelector selector = ensureThatIdIsUnique();
AnalysisResult result = createAnalysisResult(report.getReport(), selector, report.getBlames(),
report.getSizeOfOrigin());
logger.log("Created analysis result for %d issues (found %d new issues, fixed %d issues)",
result.getTotalSize(), result.getNewSize(), result.getFixedSize());
ResultAction action = new ResultAction(run, result, healthDescriptor, getId(), name, sourceCodeEncoding);
run.addAction(action);
run.addOrReplaceAction(new AggregationAction());
return action;
}
内容来源于网络,如有侵权,请联系作者删除!