public abstract class DurableTask extends AbstractDescribableImpl<DurableTask> implements ExtensionPoint
config.jelly for form data binding.ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
DurableTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
captureOutput()
Requests that standard output of the task be captured rather than streamed.
|
void |
charset(Charset cs)
Requests that a specified charset be used to transcode process output.
|
void |
defaultCharset()
Requests that the node’s system charset be used to transcode process output.
|
DurableTaskDescriptor |
getDescriptor() |
abstract Controller |
launch(EnvVars env,
FilePath workspace,
Launcher launcher,
TaskListener listener)
Launches a durable task.
|
public DurableTaskDescriptor getDescriptor()
getDescriptor in interface Describable<DurableTask>getDescriptor in class AbstractDescribableImpl<DurableTask>public abstract Controller launch(EnvVars env, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException
env - basic environment variables to use during launchworkspace - the workspace to uselauncher - a way to start processeslistener - log output for the buildIOExceptionInterruptedExceptionpublic void captureOutput()
throws UnsupportedOperationException
Controller.watch(hudson.FilePath, org.jenkinsci.plugins.durabletask.Handler, hudson.model.TaskListener), standard output will not be sent to Handler.output(java.io.InputStream); it will be included in Handler.exited(int, byte[]) instead.
Otherwise (using polling mode), standard output will not be sent to Controller.writeLog(hudson.FilePath, java.io.OutputStream); call Controller.getOutput(hudson.FilePath, hudson.Launcher) to collect.
Standard error should still be streamed to the log.
Should be called prior to launch(hudson.EnvVars, hudson.FilePath, hudson.Launcher, hudson.model.TaskListener) to take effect.UnsupportedOperationException - if this implementation does not support that modepublic void charset(@NonNull
Charset cs)
Controller.writeLog(hudson.FilePath, java.io.OutputStream) and Controller.getOutput(hudson.FilePath, hudson.Launcher) is then presumed to be UTF-8.
If not called, no translation is performed.cs - the character set in which process output is expected to bepublic void defaultCharset()
Controller.writeLog(hudson.FilePath, java.io.OutputStream) and Controller.getOutput(hudson.FilePath, hudson.Launcher) is then presumed to be UTF-8.
If not called, no translation is performed.Copyright © 2016–2022. All rights reserved.