Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[JENKINS-31202] Make remaining plugins compatible to SimpleBuildStep.
checkstyle, dry, findbugs, pmd, tasks, analysis-collector.
  • Loading branch information
uhafner committed Nov 13, 2016
1 parent 8bbd4c8 commit 2467ad34cda280de75837126ed6bcdf86488b8d9
2 go.sh
@@ -1,4 +1,4 @@
rm -rf $JENKINS_HOME/plugins/warnings*
rm -rf $JENKINS_HOME/plugins/tasks*

mvn install || { echo "Build failed"; exit 1; }

@@ -38,7 +38,7 @@
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-core</artifactId>
<version>1.77</version>
<version>1.80-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
@@ -1,8 +1,8 @@
package hudson.plugins.tasks;

import hudson.model.AbstractProject;
import hudson.plugins.analysis.core.ResultAction;
import hudson.model.Job;
import hudson.plugins.analysis.core.AbstractProjectAction;
import hudson.plugins.analysis.core.ResultAction;

/**
* Entry point to visualize the task scanner trend graph. Drawing of the graph is
@@ -14,24 +14,24 @@ public class TasksProjectAction extends AbstractProjectAction<ResultAction<Tasks
/**
* Instantiates a new {@link TasksProjectAction}.
*
* @param project
* the project that owns this action
* @param job
* the job that owns this action
*/
public TasksProjectAction(final AbstractProject<?, ?> project) {
this(project, TasksResultAction.class);
public TasksProjectAction(final Job<?, ?> job) {
this(job, TasksResultAction.class);
}

/**
* Instantiates a new {@link TasksProjectAction}.
*
* @param project
* the project that owns this action
* @param job
* the job that owns this action
* @param type
* the result action type
*/
public TasksProjectAction(final AbstractProject<?, ?> project,
public TasksProjectAction(final Job<?, ?> job,
final Class<? extends ResultAction<TasksResult>> type) {
super(project, type, Messages._Tasks_ProjectAction_Name(), Messages._Tasks_Trend_Name(),
super(job, type, Messages._Tasks_ProjectAction_Name(), Messages._Tasks_Trend_Name(),
TasksDescriptor.PLUGIN_ID, TasksDescriptor.ICON_URL, TasksDescriptor.RESULT_URL);
}
}
@@ -10,12 +10,8 @@
import hudson.Launcher;
import hudson.matrix.MatrixAggregator;
import hudson.matrix.MatrixBuild;

import hudson.model.AbstractProject;
import hudson.model.Run;
import hudson.model.Action;
import hudson.model.BuildListener;

import hudson.model.Run;
import hudson.plugins.analysis.core.BuildResult;
import hudson.plugins.analysis.core.HealthAwarePublisher;
import hudson.plugins.analysis.util.PluginLogger;
@@ -178,11 +174,6 @@ public void setAsRegexp(boolean asRegexp) {
this.asRegexp = asRegexp;
}

@Override
public Action getProjectAction(final AbstractProject<?, ?> project) {
return new TasksProjectAction(project);
}

@Override
protected BuildResult perform(final Run<?, ?> build, FilePath workspace, final PluginLogger logger) throws InterruptedException, IOException {
TasksParserResult project;
@@ -1,5 +1,8 @@
package hudson.plugins.tasks;

import java.util.Collection;

import hudson.model.Action;
import hudson.model.Run;

import hudson.plugins.analysis.core.HealthDescriptor;
@@ -53,4 +56,8 @@ public String getSingleItemTooltip() {
return Messages.Tasks_ResultAction_OneWarning();
}

@Override
public Collection<? extends Action> getProjectActions() {
return asSet(new TasksProjectAction(getJob()));
}
}

0 comments on commit 2467ad3

Please sign in to comment.