Class ClassicUpload
- java.lang.Object
-
- com.google.jenkins.plugins.storage.AbstractUpload
-
- com.google.jenkins.plugins.storage.ClassicUpload
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<AbstractUpload>
,Serializable
public class ClassicUpload extends AbstractUpload
This upload extension implements the classical upload pattern where a user provides an Ant-style glob, e.g. ** / *.java relative to the build workspace, and those files are uploaded to the storage bucket.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClassicUpload.DescriptorImpl
Denotes this is anAbstractUpload
plugin-
Nested classes/interfaces inherited from class com.google.jenkins.plugins.storage.AbstractUpload
AbstractUpload.UploadSpec
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ClassicUpload(String bucket, UploadModule module, String pattern, String bucketNameWithVars, String sourceGlobWithVars)
Construct the classic upload implementation from the base properties and the glob for matching files.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDetails()
protected AbstractUpload.UploadSpec
getInclusions(Run<?,?> run, FilePath workspace, TaskListener listener)
Implementations override this interface in order to surface the set ofFilePath
s the core logic should upload.String
getPattern()
-
Methods inherited from class com.google.jenkins.plugins.storage.AbstractUpload
all, annotateObject, forResult, getBucket, getDescriptor, getMetadata, getModule, getOrCreateBucket, getPathPrefix, isForFailedJobs, isSharedPublicly, isShowInline, perform, perform, setForFailedJobs, setPathPrefix, setSharedPublicly, setShowInline
-
-
-
-
Constructor Detail
-
ClassicUpload
@DataBoundConstructor public ClassicUpload(String bucket, @Nullable UploadModule module, String pattern, @Deprecated @Nullable String bucketNameWithVars, @Deprecated @Nullable String sourceGlobWithVars)
Construct the classic upload implementation from the base properties and the glob for matching files.- Parameters:
bucket
- GCS bucket to upload files to.module
- Helper class for connecting to the GCS API.pattern
- The glob of files to upload, which potentially contains unresolved symbols, such as $JOB_NAME and $BUILD_NUMBER.bucketNameWithVars
- Deprecated format for bucket.sourceGlobWithVars
- Deprecated. Old name kept for deserialization.
-
-
Method Detail
-
getDetails
public String getDetails()
- Specified by:
getDetails
in classAbstractUpload
- Returns:
- Provide detail information summarizing this download for the GCS upload report.
-
getInclusions
@Nullable protected AbstractUpload.UploadSpec getInclusions(Run<?,?> run, FilePath workspace, TaskListener listener) throws UploadException
Implementations override this interface in order to surface the set ofFilePath
s the core logic should upload.- Specified by:
getInclusions
in classAbstractUpload
- Parameters:
run
- Current job being run.workspace
- Workspace of node running the job.listener
- Listener for events of this job.- Returns:
- Set of
FilePath
s to upload. - Throws:
UploadException
- If there was an issue fetching the inclusions.- See Also:
for further details.
-
getPattern
public String getPattern()
- Returns:
- The glob of files to upload, which potentially contains unresolved symbols, such as $JOB_NAME and $BUILD_NUMBER.
-
-