Class GoogleCloudStorageUploader
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- com.google.jenkins.plugins.storage.GoogleCloudStorageUploader
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
@RequiresDomain(StorageScopeRequirement.class) public class GoogleCloudStorageUploader extends Recorder
A Jenkins plugin for uploading files to Google Cloud Storage (GCS).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GoogleCloudStorageUploader.DescriptorImpl
Descriptor for the extension for uploading build artifacts to Google Cloud Storage.-
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
-
-
Field Summary
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description GoogleCloudStorageUploader(String credentialsId, List<AbstractUpload> uploads)
Construct the GCS uploader to use the provided credentials to upload build artifacts.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials
getCredentials()
String
getCredentialsId()
GoogleCloudStorageUploader.DescriptorImpl
getDescriptor()
Action
getProjectAction(AbstractProject<?,?> project)
BuildStepMonitor
getRequiredMonitorService()
Collection<AbstractUpload>
getUploads()
boolean
perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectActions, perform, prebuild
-
-
-
-
Constructor Detail
-
GoogleCloudStorageUploader
@DataBoundConstructor public GoogleCloudStorageUploader(String credentialsId, @Nullable List<AbstractUpload> uploads)
Construct the GCS uploader to use the provided credentials to upload build artifacts.- Parameters:
credentialsId
- The credentials to utilize for authenticating with GCSuploads
- The list of uploads the user has requested be done
-
-
Method Detail
-
getCredentialsId
public String getCredentialsId()
- Returns:
- The unique ID for the credentials we are using to authenticate with GCS.
-
getCredentials
public com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials getCredentials()
- Returns:
- The credentials we are using to authenticate with GCS.
-
getUploads
public Collection<AbstractUpload> getUploads()
- Returns:
- The set of tuples describing the artifacts to upload, and where to upload them.
-
perform
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException
- Specified by:
perform
in interfaceBuildStep
- Overrides:
perform
in classBuildStepCompatibilityLayer
- Throws:
IOException
InterruptedException
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
-
getDescriptor
public GoogleCloudStorageUploader.DescriptorImpl getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Publisher>
- Overrides:
getDescriptor
in classRecorder
-
getProjectAction
public Action getProjectAction(AbstractProject<?,?> project)
- Specified by:
getProjectAction
in interfaceBuildStep
- Overrides:
getProjectAction
in classBuildStepCompatibilityLayer
-
-