public class DroneRecorder
extends hudson.tasks.Recorder
implements jenkins.tasks.SimpleBuildStep
Modifier and Type | Class and Description |
---|---|
static class |
DroneRecorder.DescriptorImpl |
hudson.tasks.Publisher.DescriptorExtensionListImpl
jenkins.tasks.SimpleBuildStep.LastBuildAction, jenkins.tasks.SimpleBuildStep.LastBuildActionFactory
Constructor and Description |
---|
DroneRecorder(String serverUrl,
String channel,
String credentialsId,
String artifacts) |
Modifier and Type | Method and Description |
---|---|
protected hudson.FilePath.FileCallable<UploaderResult> |
createCallable(hudson.model.Run<?,?> run,
LoggerListenerWrapper listener,
String artifacts,
ServerData serverData) |
String |
getArtifacts()
Returns the ant glob pattern to includes files for the upload.
|
String |
getChannel()
Returns the channel id where upload collected files.
|
String |
getCredentialsId()
Returns the stored credentials id used as deploy key.
|
String |
getDeployKey()
Deprecated.
Use {
getCredentialsId() instead. |
String |
getExcludes()
Returns the ant glob pattern to exclude files from the upload.
|
hudson.tasks.BuildStepMonitor |
getRequiredMonitorService() |
String |
getServerUrl()
Returns the URL of the package drone server till the context root path.
|
boolean |
isAllowEmptyArchive()
Returns when mark the build as failed if there are no archives to upload.
|
boolean |
isDefaultExcludes()
Returns if use the ant default exclude when gather the files to upload.
|
boolean |
isFailsAsUpload()
Returns when mark the build as failed if an error was occurred during the
archives upload.
|
boolean |
isStripPath()
Returns if the resource will be uploaded without its local path.
|
boolean |
isUploadV3()
Returns if the protocol to use in upload is V3.
|
void |
perform(hudson.model.Run<?,?> run,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener taskListener) |
void |
setAllowEmptyArchive(boolean allowEmptyArchive)
Sets when mark the build as failed if there are no archives to upload.
|
void |
setDefaultExcludes(boolean defaultExcludes)
Sets if use the default ant exclude pattern to exclude files to upload.
|
void |
setDeployKey(String deployKey)
Deprecated.
|
void |
setExcludes(String excludes)
Sets the ant glob pattern to exclude some files to upload.
|
void |
setFailsAsUpload(boolean failsAsUpload)
Sets when mark the build as failed if an error was occurred during the
archives upload.
|
void |
setStripPath(boolean stripPath)
Sets if strip the path of the resources to upload.
|
void |
setUploadV3(boolean uploadV3)
Sets if use the protocol V3 to upload.
|
all, getProjectAction, needsToRunAfterFinalized, prebuild
getProjectAction, getProjectActions, perform, perform, prebuild
@DataBoundSetter public void setExcludes(String excludes)
excludes
- the ant glob pattern@DataBoundSetter public void setDefaultExcludes(boolean defaultExcludes)
defaultExcludes
- if use the default ant exclude paths.@DataBoundSetter public void setStripPath(boolean stripPath)
stripPath
- if upload only the resource with its filename.public hudson.tasks.BuildStepMonitor getRequiredMonitorService()
getRequiredMonitorService
in interface hudson.tasks.BuildStep
@DataBoundSetter public void setAllowEmptyArchive(boolean allowEmptyArchive)
allowEmptyArchive
- if is the build has to be marked as failed.@DataBoundSetter public void setFailsAsUpload(boolean failsAsUpload)
failsAsUpload
- if the build has to be marked as failed.@DataBoundSetter public void setUploadV3(boolean uploadV3)
This protocol is available since package drone server version 0.14.0 .
uploadV3
- if use the V3 protocol.@Deprecated @DataBoundSetter public void setDeployKey(String deployKey)
public String getServerUrl()
public String getArtifacts()
public String getExcludes()
public String getChannel()
public String getCredentialsId()
@Deprecated public String getDeployKey()
getCredentialsId()
instead.public boolean isDefaultExcludes()
Refers to the ant documentation for the complete list of default excludes here: http://ant.apache.org/manual/dirtasks.html#defaultexcludes
true
is use default, false
otherwise.public boolean isStripPath()
true
if strip the path, false
otherwisepublic boolean isAllowEmptyArchive()
true
is the build has to be marked as failed,
false
otherwisepublic boolean isFailsAsUpload()
true
is the build has to be marked as failed,
false
otherwise.public boolean isUploadV3()
This protocol is available since package drone server version 0.14.0 .
true
if use the V3 protocol, false
otherwisepublic void perform(hudson.model.Run<?,?> run, hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener taskListener) throws InterruptedException, IOException
perform
in interface jenkins.tasks.SimpleBuildStep
InterruptedException
IOException
protected hudson.FilePath.FileCallable<UploaderResult> createCallable(hudson.model.Run<?,?> run, LoggerListenerWrapper listener, String artifacts, ServerData serverData)
Copyright © 2016–2018. All rights reserved.