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 ClassesModifier and TypeClassDescriptionstatic final class
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
ConstructorsConstructorDescriptionGoogleCloudStorageUploader
(String credentialsId, List<AbstractUpload> uploads) Construct the GCS uploader to use the provided credentials to upload build artifacts. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials
getProjectAction
(AbstractProject<?, ?> project) 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 Details
-
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 Details
-
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
- 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
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<Publisher>
- Overrides:
getDescriptor
in classRecorder
-
getProjectAction
- Specified by:
getProjectAction
in interfaceBuildStep
- Overrides:
getProjectAction
in classBuildStepCompatibilityLayer
-