Class BourneShellScript
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<DurableTask>
-
- org.jenkinsci.plugins.durabletask.DurableTask
-
- org.jenkinsci.plugins.durabletask.FileMonitoringTask
-
- org.jenkinsci.plugins.durabletask.BourneShellScript
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<DurableTask>
public final class BourneShellScript extends FileMonitoringTask
Runs a Bourne shell script on a Unix node usingnohup
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BourneShellScript.DescriptorImpl
-
Nested classes/interfaces inherited from class org.jenkinsci.plugins.durabletask.FileMonitoringTask
FileMonitoringTask.FileMonitoringController
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
USE_BINARY_WRAPPER
-
Fields inherited from class org.jenkinsci.plugins.durabletask.FileMonitoringTask
BINARY_RESOURCE_PREFIX, COOKIE
-
-
Constructor Summary
Constructors Constructor Description BourneShellScript(String script)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
captureOutput()
Requests that standard output of the task be captured rather than streamed.String
getScript()
protected FileMonitoringTask.FileMonitoringController
launchWithCookie(FilePath ws, Launcher launcher, TaskListener listener, EnvVars envVars, String cookieVariable, String cookieValue)
-
Methods inherited from class org.jenkinsci.plugins.durabletask.FileMonitoringTask
charset, defaultCharset, doLaunch, escape, getAgentInfo, getNodeRoot, launch, requestBinary, requestBinary
-
Methods inherited from class org.jenkinsci.plugins.durabletask.DurableTask
getDescriptor
-
-
-
-
Constructor Detail
-
BourneShellScript
@DataBoundConstructor public BourneShellScript(String script)
-
-
Method Detail
-
getScript
public String getScript()
-
captureOutput
public void captureOutput()
Description copied from class:DurableTask
Requests that standard output of the task be captured rather than streamed. If you useController.watch(hudson.FilePath, org.jenkinsci.plugins.durabletask.Handler, hudson.model.TaskListener)
, standard output will not be sent toHandler.output(java.io.InputStream)
; it will be included inHandler.exited(int, byte[])
instead. Otherwise (using polling mode), standard output will not be sent toController.writeLog(hudson.FilePath, java.io.OutputStream)
; callController.getOutput(hudson.FilePath, hudson.Launcher)
to collect. Standard error should still be streamed to the log. Should be called prior toDurableTask.launch(hudson.EnvVars, hudson.FilePath, hudson.Launcher, hudson.model.TaskListener)
to take effect.- Overrides:
captureOutput
in classDurableTask
-
launchWithCookie
protected FileMonitoringTask.FileMonitoringController launchWithCookie(FilePath ws, Launcher launcher, TaskListener listener, EnvVars envVars, String cookieVariable, String cookieValue) throws IOException, InterruptedException
- Overrides:
launchWithCookie
in classFileMonitoringTask
- Throws:
IOException
InterruptedException
-
-