DockerCopyFileBasedBash

File-based implementation of CmdOutputHandler (similar to Bash.FileBased), but utilizes docker cp for container-to-host file transfer operations.

Parameters

stageGetter

A lambda retrieving the DockerPipelineStage bound to this command output handler. A lambda is necessary to prevent the stage constructor from leaking an uninitialized instance to a field.

Constructors

Link copied to clipboard
constructor(stageGetter: () -> DockerPipelineStage)

Properties

Link copied to clipboard
protected val graderLogPath: Path
Link copied to clipboard
Link copied to clipboard
private lateinit var vars: Set<String>

Functions

Link copied to clipboard
open override fun collectOutput(onSuccess: (Path) -> Unit, onFailure: (Path) -> Unit)
Link copied to clipboard
open override fun getResultContent(result: CmdUtils.Var.Result<*>): List<String>

Reads the file that stores result if the variable underlying result is registered in vars. Truncates the file content up to Configuration.PipelineStage.OutputTruncation.reportOutputLength bytes if it is too big. Otherwise return empty content.

Link copied to clipboard
open fun onAfterCore(): List<String>
Link copied to clipboard
Link copied to clipboard
open override fun onBeforeCore(): List<String>
Link copied to clipboard
open operator fun String.rangeTo(rest: String): String
Link copied to clipboard
open override fun CmdUtils.Var.register(cmd: String): String
Link copied to clipboard
open fun setup()
Link copied to clipboard
private fun varNames(extension: String): Set<String>

Find all the variable names that have valid log file names with extension searchable from EnvPath.LOG_PATH.