hudson.model.Run.addOrReplaceAction()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(74)

本文整理了Java中hudson.model.Run.addOrReplaceAction方法的一些代码示例,展示了Run.addOrReplaceAction的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Run.addOrReplaceAction方法的具体详情如下:
包路径:hudson.model.Run
类名称:Run
方法名:addOrReplaceAction

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;
}

相关文章

微信公众号

最新文章

更多

Run类方法