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.
|
ExtensionPoint.LegacyInstancesAreScopedToHudson| Modifier and Type | Field and Description |
|---|---|
protected static String |
BINARY_RESOURCE_PREFIX |
protected static String |
COOKIE |
| 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(FilePath workspace,
Launcher launcher,
TaskListener listener,
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(EnvVars envVars)
JENKINS-40734: blocks the substitutions of
EnvVars.overrideExpandingAll(java.util.Map<java.lang.String, java.lang.String>) done by Launcher. |
protected static AgentInfo |
getAgentInfo(FilePath nodeRoot) |
protected static FilePath |
getNodeRoot(FilePath workspace) |
Controller |
launch(EnvVars env,
FilePath workspace,
Launcher launcher,
TaskListener listener)
Launches a durable task.
|
protected FileMonitoringTask.FileMonitoringController |
launchWithCookie(FilePath workspace,
Launcher launcher,
TaskListener listener,
EnvVars envVars,
String cookieVariable,
String cookieValue) |
protected static FilePath |
requestBinary(FilePath nodeRoot,
AgentInfo agentInfo,
FilePath ws,
FileMonitoringTask.FileMonitoringController c)
Returns path of binary on agent.
|
protected static FilePath |
requestBinary(FilePath ws,
FileMonitoringTask.FileMonitoringController c)
Returns path of binary on agent.
|
captureOutput, getDescriptorprotected static final String COOKIE
protected static final String BINARY_RESOURCE_PREFIX
public final Controller launch(EnvVars env, FilePath workspace, Launcher launcher, 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(FilePath workspace, Launcher launcher, TaskListener listener, 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(FilePath workspace, Launcher launcher, TaskListener listener, 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(EnvVars envVars)
EnvVars.overrideExpandingAll(java.util.Map<java.lang.String, java.lang.String>) done by Launcher.protected static FilePath getNodeRoot(FilePath workspace) throws IOException
IOExceptionprotected static AgentInfo getAgentInfo(FilePath nodeRoot) throws IOException, InterruptedException
IOExceptionInterruptedException@CheckForNull protected static FilePath requestBinary(FilePath ws, FileMonitoringTask.FileMonitoringController c) throws IOException, InterruptedException
IOExceptionInterruptedException@CheckForNull protected static FilePath requestBinary(FilePath nodeRoot, AgentInfo agentInfo, FilePath ws, FileMonitoringTask.FileMonitoringController c) throws IOException, InterruptedException
IOExceptionInterruptedExceptionCopyright © 2016–2022. All rights reserved.