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 classDescriptor for the extension for uploading build artifacts to Google Cloud Storage.Nested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImplNested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherListNested 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.GoogleRobotCredentialsgetProjectAction(AbstractProject<?, ?> project) booleanperform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuildMethods 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:
performin interfaceBuildStep- Overrides:
performin classBuildStepCompatibilityLayer- Throws:
IOExceptionInterruptedException
-
getRequiredMonitorService
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<Publisher>- Overrides:
getDescriptorin classRecorder
-
getProjectAction
- Specified by:
getProjectActionin interfaceBuildStep- Overrides:
getProjectActionin classBuildStepCompatibilityLayer
-