Package de.taimos.pipeline.aws
Class S3FindFilesStep.Execution
java.lang.Object
org.jenkinsci.plugins.workflow.steps.StepExecution
org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution<FileWrapper[]>
de.taimos.pipeline.aws.S3FindFilesStep.Execution
- All Implemented Interfaces:
Serializable
- Enclosing class:
- S3FindFilesStep
public static class S3FindFilesStep.Execution
extends org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution<FileWrapper[]>
- See Also:
-
Constructor Summary
ConstructorDescriptionExecution
(S3FindFilesStep step, org.jenkinsci.plugins.workflow.steps.StepContext context) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
computeMatcherString
(String path, String glob) This computes the string that will be used to construct a PathMatcher that will attempt to match the S3 keys.static String
convertPathToAwsFormat
(Path javaPath) This converts a Path to a string that represents the AWS path.static FileWrapper
createFileWrapperFromFile
(int pathComponentCount, Path javaPath, com.amazonaws.services.s3.model.S3ObjectSummary entry) This creates a new FileWrapper instance based on the S3ObjectSummary information.static FileWrapper
createFileWrapperFromFolder
(int pathComponentCount, Path javaPath) This creates a new FileWrapper instance for the folder.run()
Methods inherited from class org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution
blocksRestart, getStatus, onResume, start, stop
Methods inherited from class org.jenkinsci.plugins.workflow.steps.StepExecution
applyAll, applyAll, getContext, getStatusBounded
-
Constructor Details
-
Execution
-
-
Method Details
-
run
- Specified by:
run
in classorg.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution<FileWrapper[]>
- Throws:
Exception
-
computeMatcherString
This computes the string that will be used to construct a PathMatcher that will attempt to match the S3 keys.- Parameters:
path
- The step's `path` parameter.glob
- The step's `glob` parameter.- Returns:
- A string that can be used to construct a PathMatcher.
-
createFileWrapperFromFile
public static FileWrapper createFileWrapperFromFile(int pathComponentCount, Path javaPath, com.amazonaws.services.s3.model.S3ObjectSummary entry) This creates a new FileWrapper instance based on the S3ObjectSummary information.- Parameters:
pathComponentCount
- The root path component count.javaPath
- The Path instance for the file.entry
- The S3ObjectSummary for the file.- Returns:
- A new FileWrapper instance.
-
createFileWrapperFromFolder
This creates a new FileWrapper instance for the folder.- Parameters:
pathComponentCount
- The root path component count.javaPath
- The Path instance for the folder.- Returns:
- A new FileWrapper instance.
-
convertPathToAwsFormat
This converts a Path to a string that represents the AWS path. Since the Path instance will be coming from a FileSystem (in fact, the OS's "default FileSystem"), we can't trust that the separator will always be "/", which is what AWS wants. So, this method will convert all of the default separators to "/".- Parameters:
javaPath
- The Path instance.- Returns:
- A string representing the path, which AWS can use.
-