public abstract class FileMonitoringTask extends DurableTask
| Modifier and Type | Class and Description |
|---|---|
protected static class |
FileMonitoringTask.FileMonitoringController
Tails a log file and watches for an exit status file.
|
| Constructor and Description |
|---|
FileMonitoringTask() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected FileMonitoringTask.FileMonitoringController |
doLaunch(hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
hudson.EnvVars envVars)
Should start a process which sends output to log file
in the workspace and finally writes its exit code to result file.
|
protected static Map<String,String> |
escape(hudson.EnvVars envVars)
JENKINS-40734: blocks the substitutions of
EnvVars.overrideExpandingAll(java.util.Map<java.lang.String, java.lang.String>) done by Launcher. |
Controller |
launch(hudson.EnvVars env,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
Launches a durable task.
|
protected FileMonitoringTask.FileMonitoringController |
launchWithCookie(hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
hudson.EnvVars envVars,
String cookieVariable,
String cookieValue) |
static void |
shutDownWatchService() |
captureOutput, getDescriptorpublic final Controller launch(hudson.EnvVars env, hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener) throws IOException, InterruptedException
DurableTasklaunch in class DurableTaskenv - basic environment variables to use during launchworkspace - the workspace to uselauncher - a way to start processeslistener - log output for the buildIOExceptionInterruptedExceptionprotected FileMonitoringTask.FileMonitoringController launchWithCookie(hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener, hudson.EnvVars envVars, String cookieVariable, String cookieValue) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic final void charset(Charset cs)
DurableTaskController.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.charset in class DurableTaskcs - the character set in which process output is expected to bepublic final void defaultCharset()
DurableTaskController.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.defaultCharset in class DurableTaskprotected FileMonitoringTask.FileMonitoringController doLaunch(hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener, hudson.EnvVars envVars) throws IOException, InterruptedException
workspace - the workspace to uselauncher - a way to launch processeslistener - build console logenvVars - recommended environment for the subprocessIOExceptionInterruptedExceptionprotected static Map<String,String> escape(hudson.EnvVars envVars)
EnvVars.overrideExpandingAll(java.util.Map<java.lang.String, java.lang.String>) done by Launcher.@Terminator public static void shutDownWatchService()
Copyright © 2016–2021. All rights reserved.