Represents a container for messages produced while executing some operation
Represents a configuration for what to do w/ a process output
Represents a configuration for what to do w/ a process output
If 'canCache' is true, then the output of the standard out and err will be returned if already found.
This is intended to work as follows:
# In the case where no '<workspace>/.cache/<MD5 of the command>' entry exists If there is no cached value, then the command is run as normal. A '.cache' directory will be created in the job's workspace in which we store cache metadata to contain:
<workspace>/.cache/<MD5 of the command>/.stdOutFileName # contains the name of the stdout file name <workspace>/.cache/<MD5 of the command>/.stdErrFileName # contains the name of the stderr file name <workspace>/.cache/<MD5 of the command>/.exitCode # set to the exit code <workspace>/.cache/<MD5 of the command>/.job # a serialized version of the job
If the 'stdOutFileName' or 'stdErrFileName' are left empty when 'canCache' is set, then a unique filename will be used.
This is intended to mitigate the scenario where the same command is run concurrently, both set to allow caching.
This way both jobs will run, writing to different files, and just happily clobber the contents of the cache directory.
another approach would be to detect unfinished jobs (e.g. no .exitCode exists) and tail the existing job.
# In the case where a '<workspace>/.cache/<MD5 of the command>' entry exists
If that directory exists and an .exitCode file exists, then:
## When streaming is set if the exit code is listed in the a 'successExitCodes', then the contents .stdOutFileName is returned. Otherwise the contents of the .stdErrFileName are returned.
## When streaming is not set Then the FileResult is simply returned w/ the cached values (output file names, exit code, etc)
settings for streaming back the output of the job
an option filename to save the output file to. If 'canCache' is set and the 'stdOutFileName' isn't, then a unique output file name is chosen.
an option filename to save the output file to. If 'canCache' is set and the 'stdErrFileName' isn't, then a unique output file name is chosen.
toggle ability to cache as detailed above
use the cached value when available
A job intended to produce a lot of output, and such streams the output when run.
A job intended to produce a lot of output, and such streams the output when run.
the command string to execute
the system environment
if specified, the any file dependencies this request has
Depending on the output setting specified on the RunProcess, the runner may return either a StreamingResult or a FileResult
the set of exit codes which are attribute to success
the frame length to use (if set) for delimiting output lines
the marker which, if it appears in the standard output stream, will be followed by ProcessError in json form