mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 22:42:48 +00:00
moved one more method.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1580 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
44f444e217
commit
7acc5887e9
2 files changed
+21
-18
No files matched your search
@@ -11,6 +11,11 @@ import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.util.Calendar;
|
||||
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
/**
|
||||
* Base implementation of {@link Run}s that build software.
|
||||
*
|
||||
@@ -103,4 +108,20 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
|
||||
|
||||
protected abstract Result doRun(BuildListener listener) throws Exception;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Stops this build if it's still going.
|
||||
*
|
||||
* If we use this/executor/stop URL, it causes 404 if the build is already killed,
|
||||
* as {@link #getExecutor()} returns null.
|
||||
*/
|
||||
public synchronized void doStop( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
|
||||
Executor e = getExecutor();
|
||||
if(e!=null)
|
||||
e.doStop(req,rsp);
|
||||
else
|
||||
// nothing is building
|
||||
rsp.forwardToPreviousPage(req);
|
||||
}
|
||||
}
|
||||
@@ -15,11 +15,8 @@ import hudson.tasks.Fingerprinter.FingerprintAction;
|
||||
import hudson.tasks.Publisher;
|
||||
import hudson.tasks.test.AbstractTestResultAction;
|
||||
import hudson.triggers.SCMTrigger;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -321,21 +318,6 @@ public final class Build extends AbstractBuild<Project,Build> {
|
||||
// actions
|
||||
//
|
||||
//
|
||||
/**
|
||||
* Stops this build if it's still going.
|
||||
*
|
||||
* If we use this/executor/stop URL, it causes 404 if the build is already killed,
|
||||
* as {@link #getExecutor()} returns null.
|
||||
*/
|
||||
public synchronized void doStop( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
|
||||
Executor e = getExecutor();
|
||||
if(e!=null)
|
||||
e.doStop(req,rsp);
|
||||
else
|
||||
// nothing is building
|
||||
rsp.forwardToPreviousPage(req);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a build.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user