Class StdoutUpload
java.lang.Object
com.google.jenkins.plugins.storage.AbstractUpload
com.google.jenkins.plugins.storage.StdoutUpload
- All Implemented Interfaces:
ExtensionPoint,Describable<AbstractUpload>,Serializable
This upload extension allow the user to upload the build log for the Jenkins build to a given
bucket, with a specified file name. By default, the file is named "build-log.txt".
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.google.jenkins.plugins.storage.AbstractUpload
AbstractUpload.UploadSpecNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
ConstructorsConstructorDescriptionStdoutUpload(String bucket, UploadModule module, String logName, String bucketNameWithVars) Construct the Upload with the stock properties, and the additional information about how to name the build log file. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine whether we should upload the pattern for the given build result.protected AbstractUpload.UploadSpecgetInclusions(Run<?, ?> run, FilePath workspace, TaskListener listener) Implementations override this interface in order to surface the set ofFilePaths the core logic should upload.Methods inherited from class com.google.jenkins.plugins.storage.AbstractUpload
all, annotateObject, getBucket, getDescriptor, getMetadata, getModule, getOrCreateBucket, getPathPrefix, isForFailedJobs, isSharedPublicly, isShowInline, perform, perform, setForFailedJobs, setPathPrefix, setSharedPublicly, setShowInline
-
Constructor Details
-
StdoutUpload
@DataBoundConstructor public StdoutUpload(@Nullable String bucket, @Nullable UploadModule module, String logName, @Deprecated @Nullable String bucketNameWithVars) Construct the Upload with the stock properties, and the additional information about how to name the build log file.- Parameters:
bucket- GCS bucket to upload build artifacts to.module- AnUploadModuleto use for execution.logName- Name of log file to store to GCS bucket.bucketNameWithVars- Deprecated format for bucket.
-
-
Method Details
-
getLogName
- Returns:
- The name to give the file we upload for the build log.
-
getDetails
- Specified by:
getDetailsin classAbstractUpload- Returns:
- Provide detail information summarizing this download for the GCS upload report.
-
forResult
Determine whether we should upload the pattern for the given build result.- Overrides:
forResultin classAbstractUpload- Parameters:
result- Result of the build run.- Returns:
- Whether we should upload the pattern for the given build result.
-
getInclusions
@Nullable protected AbstractUpload.UploadSpec getInclusions(Run<?, ?> run, FilePath workspace, TaskListener listener) throws UploadExceptionImplementations override this interface in order to surface the set ofFilePaths the core logic should upload.- Specified by:
getInclusionsin classAbstractUpload- Parameters:
run- Current job being run.workspace- Workspace of node running the job.listener- Listener for events of this job.- Returns:
- Set of
FilePaths to upload. - Throws:
UploadException- If there was an issue fetching the inclusions.- See Also:
-