Class StdoutUpload
- java.lang.Object
-
- com.google.jenkins.plugins.storage.AbstractUpload
-
- com.google.jenkins.plugins.storage.StdoutUpload
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<AbstractUpload>
,Serializable
public class StdoutUpload extends AbstractUpload
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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StdoutUpload.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 StdoutUpload(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
forResult(Result result)
Determine whether we should upload the pattern for the given build result.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
getLogName()
-
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 Detail
-
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 Detail
-
getLogName
public String getLogName()
- Returns:
- The name to give the file we upload for the build log.
-
getDetails
public String getDetails()
- Specified by:
getDetails
in classAbstractUpload
- Returns:
- Provide detail information summarizing this download for the GCS upload report.
-
forResult
public boolean forResult(Result result)
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 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.
-
-