Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix AbstractMethodError for freestyle post build step (ReportRecorder) #81

Merged
merged 1 commit into from
Sep 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.FilePath;
import hudson.model.AbstractProject;
import hudson.model.Item;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.Launcher;
import hudson.model.*;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Publisher;
import hudson.tasks.Recorder;
Expand Down Expand Up @@ -89,6 +87,24 @@ public void setDisplayType(String displayType) {
this.displayType = displayType;
}

@Override
public Descriptor getDescriptor() {
return (Descriptor) super.getDescriptor();
}

@Override
public boolean perform(final AbstractBuild<?, ?> build, final Launcher launcher, final BuildListener listener)
throws InterruptedException, IOException {
FilePath workspace = build.getWorkspace();
if (workspace == null) {
throw new IOException("No workspace found for " + build);
}

perform(build, workspace, listener);

return true;
}

/**
* Executes the build step.jelly.
*
Expand Down Expand Up @@ -139,6 +155,7 @@ private Report scan(final Run<?, ?> run, final FilePath workspace, final TaskLis

return reportScanner.scan();
}


/**
* Descriptor for this step.jelly: defines the context and the UI elements.
Expand Down