Class ClassicUpload
java.lang.Object
com.google.jenkins.plugins.storage.AbstractUpload
com.google.jenkins.plugins.storage.ClassicUpload
- All Implemented Interfaces:
ExtensionPoint
,Describable<AbstractUpload>
,Serializable
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:
-
Nested Class Summary
Nested ClassesNested 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
ConstructorsConstructorDescriptionClassicUpload
(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
Modifier and TypeMethodDescriptionprotected 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.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 Details
-
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 Details
-
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 UploadExceptionImplementations 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:
-
getPattern
- Returns:
- The glob of files to upload, which potentially contains unresolved symbols, such as $JOB_NAME and $BUILD_NUMBER.
-