@RequiresDomain(value=StorageScopeRequirement.class) public class ExpiringBucketLifecycleManagerStep extends hudson.tasks.Recorder implements jenkins.tasks.SimpleBuildStep, Serializable
ExpiringBucketLifecycleManager
to be run in pipelines. Run only in
post step.Modifier and Type | Class and Description |
---|---|
static class |
ExpiringBucketLifecycleManagerStep.DescriptorImpl
Descriptor for
ExpiringBucketLifecycleManagerStep |
hudson.tasks.Publisher.DescriptorExtensionListImpl
jenkins.tasks.SimpleBuildStep.LastBuildAction, jenkins.tasks.SimpleBuildStep.LastBuildActionFactory
Constructor and Description |
---|
ExpiringBucketLifecycleManagerStep(String credentialsId,
String bucket,
Integer ttl)
Constructs a new
ExpiringBucketLifecycleManagerStep . |
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.
|
Modifier and Type | Method and Description |
---|---|
String |
getBucket() |
String |
getCredentialsId() |
int |
getTtl() |
void |
perform(hudson.model.Run<?,?> run,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
*
|
all, getProjectAction, needsToRunAfterFinalized, prebuild
getProjectAction, getProjectActions, perform, perform, prebuild
@DataBoundConstructor public ExpiringBucketLifecycleManagerStep(String credentialsId, String bucket, Integer ttl)
ExpiringBucketLifecycleManagerStep
.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.public ExpiringBucketLifecycleManagerStep(String credentialsId, String bucket, Optional<UploadModule> module, Integer ttl)
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.public String getCredentialsId()
public String getBucket()
public int getTtl()
public void perform(hudson.model.Run<?,?> run, hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener) throws IOException
perform
in interface jenkins.tasks.SimpleBuildStep
IOException
Copyright © 2016–2020. All rights reserved.