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:
  • Constructor Details

    • ExpiringBucketLifecycleManagerStep

      @DataBoundConstructor public ExpiringBucketLifecycleManagerStep(String credentialsId, String bucket, Integer ttl)
      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

      public String getCredentialsId()
      Returns:
      The unique ID for the credentials we are using to authenticate with GCS.
    • getBucket

      public String 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 interface SimpleBuildStep
      Throws:
      IOException