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.UploadSpec
Nested 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 TypeMethodDescriptionboolean
Determine whether we should upload the pattern for the given build result.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.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
- AnUploadModule
to 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:
getDetails
in 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:
forResult
in 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 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:
-