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

Commit

Permalink
[JENKINS-31202] Make remaining plugins compatible to SimpleBuildStep.
Browse files Browse the repository at this point in the history
checkstyle, dry, findbugs, pmd, tasks, analysis-collector.
  • Loading branch information
uhafner committed Nov 13, 2016
1 parent 312a988 commit 560aa68
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 82 deletions.
8 changes: 8 additions & 0 deletions go.sh
@@ -0,0 +1,8 @@
rm -rf $JENKINS_HOME/plugins/findbugs*

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

cp -f target/*.hpi $JENKINS_HOME/plugins/

cd $JENKINS_HOME
./go.sh
114 changes: 57 additions & 57 deletions plugin/findbugs.iml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion plugin/pom.xml
Expand Up @@ -46,7 +46,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>
Expand Down
@@ -1,15 +1,15 @@
package hudson.plugins.findbugs;

import hudson.model.AbstractProject;
import hudson.plugins.analysis.core.ResultAction;
import hudson.plugins.analysis.core.AbstractProjectAction;
import hudson.plugins.analysis.graph.BuildResultGraph;
import hudson.plugins.findbugs.dashboard.FindbugsEvaluationsGraph;

import java.util.List;

import com.google.common.collect.Lists;

import hudson.model.Job;
import hudson.plugins.analysis.core.AbstractProjectAction;
import hudson.plugins.analysis.core.ResultAction;
import hudson.plugins.analysis.graph.BuildResultGraph;
import hudson.plugins.findbugs.dashboard.FindbugsEvaluationsGraph;

/**
* Entry point to visualize the FindBugs trend graph in the project screen.
* Drawing of the graph is delegated to the associated {@link ResultAction}.
Expand All @@ -20,24 +20,24 @@ public class FindBugsProjectAction extends AbstractProjectAction<ResultAction<Fi
/**
* Instantiates a new {@link FindBugsProjectAction}.
*
* @param project
* the project that owns this action
* @param job
* the job that owns this action
*/
public FindBugsProjectAction(final AbstractProject<?, ?> project) {
this(project, FindBugsResultAction.class);
public FindBugsProjectAction(final Job<?, ?> job) {
this(job, FindBugsResultAction.class);
}

/**
* Instantiates a new {@link FindBugsProjectAction}.
*
* @param project
* the project that owns this action
* @param job
* the job that owns this action
* @param type
* the result action type
*/
public FindBugsProjectAction(final AbstractProject<?, ?> project,
public FindBugsProjectAction(final Job<?, ?> job,
final Class<? extends ResultAction<FindBugsResult>> type) {
super(project, type, Messages._FindBugs_ProjectAction_Name(), Messages._FindBugs_Trend_Name(),
super(job, type, Messages._FindBugs_ProjectAction_Name(), Messages._FindBugs_Trend_Name(),
FindBugsDescriptor.PLUGIN_ID, FindBugsDescriptor.ICON_URL, FindBugsDescriptor.RESULT_URL);
}

Expand Down
Expand Up @@ -10,17 +10,13 @@
import hudson.Launcher;
import hudson.matrix.MatrixAggregator;
import hudson.matrix.MatrixBuild;

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

import hudson.model.TaskListener;
import hudson.plugins.analysis.core.BuildResult;
import hudson.plugins.analysis.core.FilesParser;
import hudson.plugins.analysis.core.HealthAwarePublisher;
import hudson.plugins.analysis.core.ParserResult;
import hudson.plugins.analysis.core.BuildResult;
import hudson.plugins.analysis.util.PluginLogger;
import hudson.plugins.findbugs.parser.FindBugsParser;

Expand Down Expand Up @@ -135,11 +131,6 @@ public void setIncludePattern(String includePattern) {
this.includePattern = includePattern;
}

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

@Override
public BuildResult perform(final Run<?, ?> build, final FilePath workspace, final PluginLogger logger) throws InterruptedException, IOException {
logger.log("Collecting findbugs analysis files...");
Expand Down
@@ -1,5 +1,8 @@
package hudson.plugins.findbugs;

import java.util.Collection;

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

import hudson.plugins.analysis.core.HealthDescriptor;
Expand Down Expand Up @@ -41,4 +44,9 @@ public String getDisplayName() {
protected PluginDescriptor getDescriptor() {
return new FindBugsDescriptor();
}

@Override
public Collection<? extends Action> getProjectActions() {
return asSet(new FindBugsProjectAction(getJob()));
}
}
7 changes: 7 additions & 0 deletions release.sh
@@ -0,0 +1,7 @@
#!/bin/sh

git pull
git push
mvn -B -Djava.net.id=drulli release:prepare release:perform


0 comments on commit 560aa68

Please sign in to comment.