Class StdoutUploadStep
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- com.google.jenkins.plugins.storage.StdoutUploadStep
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
,Serializable
,SimpleBuildStep
@RequiresDomain(StorageScopeRequirement.class) public class StdoutUploadStep extends Recorder implements SimpleBuildStep, Serializable
Build Step wrapper forStdoutUpload
to be run in pipelines. Run only in post step.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StdoutUploadStep.DescriptorImpl
Descriptor forStdoutUploadStep
-
Nested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
-
Field Summary
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description StdoutUploadStep(String credentialsId, String bucket, String logName)
Constructs a newStdoutUploadStep
.StdoutUploadStep(String credentialsId, String bucket, Optional<UploadModule> module, String logName)
Construct the StdoutUpload uploader to use the provided credentials to upload build artifacts.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBucket()
String
getCredentialsId()
String
getLogName()
String
getPathPrefix()
BuildStepMonitor
getRequiredMonitorService()
*boolean
isSharedPublicly()
boolean
isShowInline()
void
perform(Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener)
*void
setPathPrefix(String pathPrefix)
void
setSharedPublicly(boolean sharedPublicly)
void
setShowInline(boolean showInline)
-
Methods inherited from class hudson.tasks.Recorder
getDescriptor
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, perform, prebuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, perform, prebuild
-
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
-
-
-
Constructor Detail
-
StdoutUploadStep
@DataBoundConstructor public StdoutUploadStep(String credentialsId, String bucket, String logName)
Constructs a newStdoutUploadStep
.- Parameters:
credentialsId
- The credentials to utilize for authenticating with GCS.bucket
- GCS bucket to upload build artifacts to.logName
- Name of log file to store to GCS bucket.
-
StdoutUploadStep
public StdoutUploadStep(String credentialsId, String bucket, Optional<UploadModule> module, String logName)
Construct the StdoutUpload uploader to use the provided credentials to upload build artifacts.- Parameters:
credentialsId
- The credentials to utilize for authenticating with GCS.bucket
- GCS bucket to upload build artifacts to.module
- Helper class for connecting to the GCS API.logName
- Name of log file to store to GCS bucket.
-
-
Method Detail
-
setSharedPublicly
@DataBoundSetter public void setSharedPublicly(boolean sharedPublicly)
- Parameters:
sharedPublicly
- Whether to surface the file being uploaded to anyone with the link.
-
isSharedPublicly
public boolean isSharedPublicly()
- Returns:
- Whether to surface the file being uploaded to anyone with the link.
-
setShowInline
@DataBoundSetter public void setShowInline(boolean showInline)
- Parameters:
showInline
- Whether to indicate in metadata that the file should be viewable inline in web browsers, rather than requiring it to be downloaded first.
-
isShowInline
public boolean isShowInline()
- Returns:
- Whether to indicate in metadata that the file should be viewable inline in web browsers, rather than requiring it to be downloaded first.
-
setPathPrefix
@DataBoundSetter public void setPathPrefix(@Nullable String pathPrefix)
- Parameters:
pathPrefix
- The path prefix that will be stripped from uploaded files. May be null if no path prefix needs to be stripped. Filenames that do not start with this prefix will not be modified. Trailing slash is automatically added if it is missing.
-
getPathPrefix
@Nullable public String getPathPrefix()
-
getLogName
public String getLogName()
-
getBucket
public String getBucket()
-
getCredentialsId
public String getCredentialsId()
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
*- Specified by:
getRequiredMonitorService
in interfaceBuildStep
-
perform
public void perform(Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException
*- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
IOException
-
-