Class ExpiringBucketLifecycleManagerStep
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.tasks.Recorder
com.google.jenkins.plugins.storage.ExpiringBucketLifecycleManagerStep
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
,Serializable
,SimpleBuildStep
@RequiresDomain(StorageScopeRequirement.class)
public class ExpiringBucketLifecycleManagerStep
extends Recorder
implements SimpleBuildStep, Serializable
Build Step wrapper for
ExpiringBucketLifecycleManager
to be run in pipelines. Run only in
post step.- See Also:
-
Nested Class Summary
Nested ClassesNested 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
ConstructorsConstructorDescriptionExpiringBucketLifecycleManagerStep
(String credentialsId, String bucket, Integer ttl) Constructs a newExpiringBucketLifecycleManagerStep
.ExpiringBucketLifecycleManagerStep
(String credentialsId, String bucket, Optional<UploadModule> module, Integer ttl) Construct the ExpiringBucketLifecycleManager uploader to use the provided credentials to set number of days after which to delete data stored in the specified GCS bucket. -
Method Summary
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, getRequiredMonitorService, perform, prebuild
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
Constructor Details
-
ExpiringBucketLifecycleManagerStep
@DataBoundConstructor public ExpiringBucketLifecycleManagerStep(String credentialsId, String bucket, Integer ttl) Constructs a newExpiringBucketLifecycleManagerStep
.- Parameters:
credentialsId
- The credentials to utilize for authenticating with GCS.bucket
- GCS Bucket in which to alter the time to live.ttl
- The number of days after which to delete data stored in the GCS bucket.
-
ExpiringBucketLifecycleManagerStep
public ExpiringBucketLifecycleManagerStep(String credentialsId, String bucket, Optional<UploadModule> module, Integer ttl) Construct the ExpiringBucketLifecycleManager uploader to use the provided credentials to set number of days after which to delete data stored in the specified GCS bucket.- Parameters:
credentialsId
- The credentials to utilize for authenticating with GCS.bucket
- GCS Bucket in which to alter the time to live.module
- Helper class for connecting to the GCS API.ttl
- The number of days after which to delete data stored in the GCS bucket.
-
-
Method Details
-
getCredentialsId
- Returns:
- The unique ID for the credentials we are using to authenticate with GCS.
-
getBucket
- Returns:
- Name of our GCS bucket.
-
getTtl
public int getTtl()- Returns:
- Surface the TTL for objects contained within the bucket for roundtripping to the jelly UI.
-
perform
public void perform(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException*- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
IOException
-