Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
[JENKINS-31202] Provide empty list of project actions for pipelines.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Jun 1, 2016
1 parent 43c6179 commit b0f1a2c
Showing 1 changed file with 17 additions and 2 deletions.
@@ -1,5 +1,7 @@
package hudson.plugins.analysis.core;

import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;

Expand All @@ -12,10 +14,12 @@

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import jenkins.model.Jenkins;
import jenkins.tasks.SimpleBuildStep.LastBuildAction;

import hudson.maven.MavenBuild;
import hudson.maven.MavenModule;
import hudson.model.AbstractBuild;
import hudson.model.Action;
import hudson.model.HealthReport;
import hudson.model.HealthReportingAction;
import hudson.model.Run;
Expand All @@ -36,8 +40,8 @@
*/
//CHECKSTYLE:COUPLING-OFF
@ExportedBean
public abstract class AbstractResultAction<T extends BuildResult> implements StaplerProxy, HealthReportingAction, ToolTipProvider, ResultAction<T> {
/** The associated build of this action. */
public abstract class AbstractResultAction<T extends BuildResult> implements StaplerProxy, HealthReportingAction, ToolTipProvider, ResultAction<T>, LastBuildAction {
/** The associated run of this action. */
private final Run<?, ?> owner;
/** Parameters for the health report. */
private final AbstractHealthDescriptor healthDescriptor;
Expand Down Expand Up @@ -118,6 +122,17 @@ public ToolTipProvider getToolTipProvider() {
return owner;
}

/**
* Returns the project actions if this action is used in a pipeline.
*
* @return default implementation returns empty collection, plug-in must override if they want to contribute to the UI
*/
// FIXME: See JENKINS-31202. Currently the whole graphing is based around AbstractBuild (large refactoring required)
@Override
public Collection<? extends Action> getProjectActions() {
return Collections.emptyList();
}

/**
* Added for backward compatibility. It generates <pre>AbstractBuild getOwner()</pre> bytecode during the build
* process, so old implementations can use that signature.
Expand Down

0 comments on commit b0f1a2c

Please sign in to comment.