Class TaskOutput.Builder
java.lang.Object
co.yellowdog.platform.model.builders.ValidatedBuilder<TaskOutput>
co.yellowdog.platform.model.TaskOutput.Builder
- Enclosing class:
TaskOutput
A builder that can be used to build a new TaskOutput that is automatically validated on build.
-
Method Summary
Modifier and TypeMethodDescriptionalwaysUpload
(boolean alwaysUpload) Indicates that the outputs should still be uploaded even if the task execution failed or was aborted.Builds the object without enforcing validation constraints.directoryName
(String directoryName) The pre-configured directory name; only if the source is set to TaskOutputSource.OTHER_DIRECTORY.filePattern
(String filePattern) An ant-style pattern to select output files by path.fromDirectory
(String directoryName, String filePattern) Specifies that matching files from the directory (defined in the agent configuration with the specified name) should be uploaded.fromDirectory
(String directoryName, String filePattern, boolean required) Specifies that matching files from the directory (defined in the agent configuration with the specified name) should be uploaded.Specifies that the text file containing the output from the task execution process should be uploaded.fromWorkerDirectory
(String filePattern) Specifies that matching files from the working directory of the worker that executed the task should be uploaded.fromWorkerDirectory
(String filePattern, boolean required) Specifies that matching files from the working directory of the worker that executed the task should be uploaded.required
(boolean required) Indicates that at least one output should be found otherwise the task execution is failed.source
(TaskOutputSource source) The source context where the outputs can be found.toString()
Methods inherited from class co.yellowdog.platform.model.builders.ValidatedBuilder
build, validate
-
Method Details
-
fromWorkerDirectory
Specifies that matching files from the working directory of the worker that executed the task should be uploaded.- Parameters:
filePattern
- an ant-style pattern to select files by path relative to the working directory- Returns:
- the builder
-
fromWorkerDirectory
Specifies that matching files from the working directory of the worker that executed the task should be uploaded.- Parameters:
filePattern
- an ant-style pattern to select files by path relative to the working directoryrequired
- indicates if at least one matching file is required- Returns:
- the builder
-
fromDirectory
Specifies that matching files from the directory (defined in the agent configuration with the specified name) should be uploaded.- Parameters:
directoryName
- the pre-configured name of the directory from which to upload filesfilePattern
- an ant-style pattern to select files by path relative to the working directory- Returns:
- the builder
-
fromDirectory
Specifies that matching files from the directory (defined in the agent configuration with the specified name) should be uploaded.- Parameters:
directoryName
- the pre-configured name of the directory from which to upload filesfilePattern
- an ant-style pattern to select files by path relative to the working directoryrequired
- indicates if at least one matching file is required- Returns:
- the builder
-
fromTaskProcess
Specifies that the text file containing the output from the task execution process should be uploaded.- Returns:
- the builder
-
source
The source context where the outputs can be found.- Parameters:
source
- the source context where the outputs can be found- Returns:
this
.
-
directoryName
The pre-configured directory name; only if the source is set to TaskOutputSource.OTHER_DIRECTORY.- Parameters:
directoryName
- the pre-configured directory name- Returns:
this
.
-
filePattern
An ant-style pattern to select output files by path.- Parameters:
filePattern
- an ant-style pattern to select output files by path- Returns:
this
.
-
alwaysUpload
Indicates that the outputs should still be uploaded even if the task execution failed or was aborted.- Parameters:
alwaysUpload
- indicates that the outputs should still be uploaded even if the task execution failed or was aborted- Returns:
this
.
-
required
Indicates that at least one output should be found otherwise the task execution is failed.- Parameters:
required
- at least one output is required- Returns:
this
.
-
buildUnchecked
Description copied from class:ValidatedBuilder
Builds the object without enforcing validation constraints. This should only be used for testing purposes- Overrides:
buildUnchecked
in classValidatedBuilder<TaskOutput>
- Returns:
- the object being built
-
toString
-