Class BlobStorePublisher
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- jenkins.plugins.jclouds.blobstore.BlobStorePublisher
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
public class BlobStorePublisher extends Recorder implements Describable<Publisher>
Publishes artifacts to Blobstore configured using JClouds- Author:
- Vijay Kiran
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlobStorePublisher.DescriptorImpl
-
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 Modifier and Type Field Description static BlobStorePublisher.DescriptorImpl
DESCRIPTOR
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description BlobStorePublisher(String profileName, List<BlobStoreEntry> entries)
Create a new Blobstore publisher for the configured profile identified by profileName
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<BlobStoreEntry>
getEntries()
Get list of entries to be uploaded.String
getName()
BlobStoreProfile
getProfile()
BuildStepMonitor
getRequiredMonitorService()
boolean
perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)
Perform the build step of uploading the configured file entries to the blobstore.void
setName(String profileName)
-
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, prebuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.model.Describable
getDescriptor
-
-
-
-
Field Detail
-
DESCRIPTOR
@Extension public static final BlobStorePublisher.DescriptorImpl DESCRIPTOR
-
-
Constructor Detail
-
BlobStorePublisher
@DataBoundConstructor public BlobStorePublisher(String profileName, List<BlobStoreEntry> entries)
Create a new Blobstore publisher for the configured profile identified by profileName- Parameters:
profileName
- The name of the configured profile name.entries
- The list of entries to be handled.
-
-
Method Detail
-
getEntries
public List<BlobStoreEntry> getEntries()
Get list of entries to be uploaded.- Returns:
- The list of entries to be uploaded.
-
getProfile
public BlobStoreProfile getProfile()
- Returns:
- - current profile for a profileName or returns the first one if the profileName isn't configured
-
getName
public String getName()
-
setName
public void setName(String profileName)
-
perform
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException
Perform the build step of uploading the configured file entries to the blobstore.- If the build result is failure, will not do anything except logging the stuff.
- If the blobstore profile isn't configured, or the uploading failed, the build is set to be unstable.
- If the upload is succesful, the build is set to be stable.
- Specified by:
perform
in interfaceBuildStep
- Overrides:
perform
in classBuildStepCompatibilityLayer
- Parameters:
build
- - reference to current build.launcher
- -Launcher
listener
- -BuildListener
- Returns:
- Always returns
true
to indicate that build can continue, so we won't block other steps. - Throws:
InterruptedException
- if the upload gets interrupted.IOException
- if an IO error occurs.
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
- Specified by:
getRequiredMonitorService
in interfaceBuildStep
- Returns:
- BuildStepMonitor.STEP
- See Also:
BuildStepMonitor.STEP
-
-