The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.
For a list of other such plugins, see the Pipeline Steps Reference page.
step([$class: 'BapFtpPromotionPublisherPlugin'])
: Send build artifacts over FTPpublishers
configName
Select an FTP configuration from the list configured in the global configuration of this Jenkins.
The configuration defines the connection properties and base directory of the FTP server.
String
verbose
boolean
transfers
sourceFiles
Files to upload to a server.
The string is a comma separated list of includes for an Ant fileset eg. '**/*.jar' (see Patterns in the Ant manual).
The base directory for this fileset is the workspace.
String
excludes
Exclude files from the Transfer set.
The string is a comma separated list of excludes for an Ant fileset eg. '**/*.log,**/*.tmp,.git/' (see Patterns in the Ant manual)
String
remoteDirectory
Optional destination folder.
This folder will be below the one in the global configuration, if present.
The folder will be created if does not exist.
String
removePrefix
First part of the file path that should not be created on the remote server.
Directory structures are created relative to the base directory, which is usually the workspace.
You normally do not want the full path to these files to be created on the server.
For example if Source files were target/deployment/images/**/
then you may want Remove prefix to be target/deployment
This would create the images folder under the remote directory, and not target/deployment
Jenkins environment variables can be used in this path.
If you use remove prefix, then ALL source file paths MUST start with the prefix.
String
asciiMode
Select to enable ASCII mode for the transfer, otherwise binary transfer mode will be used.
Use with ASCII text files to fix the line terminators when transferring between different operating systems.
boolean
remoteDirectorySDF
Select this to include the timestamp in the remote directory.
The timestamp is the date of build. If this publisher is being used during a promotion, then the timestamp is that of the build that is being promoted.
This setting turns the remote directory option into a java SimpleDateFormat.
The SimpleDateFormat(SDF) uses letters to represent components of the date, like the month, year, or day of the week. Click here for more information about the date patterns.
As the SDF reserves all of the letters [A-Z][a-z], any that you want to appear literally in the directory that is created will need to be quoted.
Some examples follow - all examples are based on a build with a timestamp of 3:45 pm and 55 seconds on the 7th November 2010.
Remote directory | Directories created |
---|---|
'qa-approved/'yyyyMMddHHmmss |
qa-approved/20101107154555 |
'builds/'yyyy/MM/dd/'build-${BUILD_NUMBER}' |
builds/2010/11/07/build-456 (if the build was number 456) |
yyyy_MM/'build'-EEE-d-HHmmss |
2010_11/build-Sun-7-154555 |
yyyy-MM-dd_HH-mm-ss |
2010-11-07_15-45-55 |
boolean
flatten
Only create files on the server, don't create directories (except for the remote directory, if present).
All files that have been selected to transfer must have unique filenames. The publisher will stop and fail as soon as a duplicate filename is found when using the flatten option.
boolean
cleanRemote
Select to delete all files and directories within the remote directory before transferring files.
boolean
noDefaultExcludes
boolean
makeEmptyDirs
The default behaviour of this plugin is to match files, and then create any directories required to preserve the paths to the files.
Selecting this option will create any directories that match the Source files pattern, even if empty.
boolean
patternSeparator
The regular expression that is used to separate the Source files and Exclude files patterns.
The Source files and Exclude files both accept multiple patterns that by default are split using
[, ]+which is how Ant, by default, handles multiple patterns in a single string.
The above expression makes it difficult to reference files or directories that contain spaces. This option allows the expression to be set to something that will preserve the spaces in a pattern eg. a single comma.
String
useWorkspaceInPromotion
Set the root directory for the Source files to the workspace.
By default this plugin uses the artifacts directory (where archived artifacts are stored). This allows the artifacts from the build number that you are promoting to be sent somewhere else.
If you run tasks that produce files in the workspace during the promotion and you want to publish them, then set this option.
If you need to send files from both the workspace and the archive directory, then you need to add a second server, even if you want to send the files to the same place. This is due to the fact that the workspace is not necessarily on the same host as the archive directory
boolean
usePromotionTimestamp
Use the build time of the promotion when the remote directory is a date format.
By default this plugin uses the time of the original build (the one that is being promoted) when formatting the remote directory. Setting this option will mean that if you use the remote directory is a date format option, it will use the time that the promotion process runs, instead of the original build.
boolean
ftpRetry
If publishing to this server fails, try again.
Files that were successfully transferred will not be re-sent.
If the Clean remote option is selected, and succeeds, it will not be attempted again.
retries
int
retryDelay
long
ftpLabel
Set the label for this Server instance - for use with Parameterized publishing.
Expand the help for Parameterized publishing for more details.
label
Set the label for this Server instance - for use with Parameterized publishing.
Expand the help for Parameterized publishing for more details.
String
ftpCredentials
If you want to use different credentials from those configured for this server, or if the credentials have not been specified for this server, then enable this option and set the username and password to use.
username
String
password
String
continueOnError
boolean
failOnError
boolean
alwaysPublishFromMaster
boolean
masterNodeName
String
paramPublish
parameterName
String
ftpPublisher
: Send build artifacts over FTPpublishers
configName
Select an FTP configuration from the list configured in the global configuration of this Jenkins.
The configuration defines the connection properties and base directory of the FTP server.
String
verbose
boolean
transfers
sourceFiles
Files to upload to a server.
The string is a comma separated list of includes for an Ant fileset eg. '**/*.jar' (see Patterns in the Ant manual).
The base directory for this fileset is the workspace.
String
excludes
Exclude files from the Transfer set.
The string is a comma separated list of excludes for an Ant fileset eg. '**/*.log,**/*.tmp,.git/' (see Patterns in the Ant manual)
String
remoteDirectory
Optional destination folder.
This folder will be below the one in the global configuration, if present.
The folder will be created if does not exist.
String
removePrefix
First part of the file path that should not be created on the remote server.
Directory structures are created relative to the base directory, which is usually the workspace.
You normally do not want the full path to these files to be created on the server.
For example if Source files were target/deployment/images/**/
then you may want Remove prefix to be target/deployment
This would create the images folder under the remote directory, and not target/deployment
Jenkins environment variables can be used in this path.
If you use remove prefix, then ALL source file paths MUST start with the prefix.
String
asciiMode
Select to enable ASCII mode for the transfer, otherwise binary transfer mode will be used.
Use with ASCII text files to fix the line terminators when transferring between different operating systems.
boolean
remoteDirectorySDF
Select this to include the timestamp in the remote directory.
The timestamp is the date of build. If this publisher is being used during a promotion, then the timestamp is that of the build that is being promoted.
This setting turns the remote directory option into a java SimpleDateFormat.
The SimpleDateFormat(SDF) uses letters to represent components of the date, like the month, year, or day of the week. Click here for more information about the date patterns.
As the SDF reserves all of the letters [A-Z][a-z], any that you want to appear literally in the directory that is created will need to be quoted.
Some examples follow - all examples are based on a build with a timestamp of 3:45 pm and 55 seconds on the 7th November 2010.
Remote directory | Directories created |
---|---|
'qa-approved/'yyyyMMddHHmmss |
qa-approved/20101107154555 |
'builds/'yyyy/MM/dd/'build-${BUILD_NUMBER}' |
builds/2010/11/07/build-456 (if the build was number 456) |
yyyy_MM/'build'-EEE-d-HHmmss |
2010_11/build-Sun-7-154555 |
yyyy-MM-dd_HH-mm-ss |
2010-11-07_15-45-55 |
boolean
flatten
Only create files on the server, don't create directories (except for the remote directory, if present).
All files that have been selected to transfer must have unique filenames. The publisher will stop and fail as soon as a duplicate filename is found when using the flatten option.
boolean
cleanRemote
Select to delete all files and directories within the remote directory before transferring files.
boolean
noDefaultExcludes
boolean
makeEmptyDirs
The default behaviour of this plugin is to match files, and then create any directories required to preserve the paths to the files.
Selecting this option will create any directories that match the Source files pattern, even if empty.
boolean
patternSeparator
The regular expression that is used to separate the Source files and Exclude files patterns.
The Source files and Exclude files both accept multiple patterns that by default are split using
[, ]+which is how Ant, by default, handles multiple patterns in a single string.
The above expression makes it difficult to reference files or directories that contain spaces. This option allows the expression to be set to something that will preserve the spaces in a pattern eg. a single comma.
String
useWorkspaceInPromotion
Set the root directory for the Source files to the workspace.
By default this plugin uses the artifacts directory (where archived artifacts are stored). This allows the artifacts from the build number that you are promoting to be sent somewhere else.
If you run tasks that produce files in the workspace during the promotion and you want to publish them, then set this option.
If you need to send files from both the workspace and the archive directory, then you need to add a second server, even if you want to send the files to the same place. This is due to the fact that the workspace is not necessarily on the same host as the archive directory
boolean
usePromotionTimestamp
Use the build time of the promotion when the remote directory is a date format.
By default this plugin uses the time of the original build (the one that is being promoted) when formatting the remote directory. Setting this option will mean that if you use the remote directory is a date format option, it will use the time that the promotion process runs, instead of the original build.
boolean
ftpRetry
If publishing to this server fails, try again.
Files that were successfully transferred will not be re-sent.
If the Clean remote option is selected, and succeeds, it will not be attempted again.
retries
int
retryDelay
long
ftpLabel
Set the label for this Server instance - for use with Parameterized publishing.
Expand the help for Parameterized publishing for more details.
label
Set the label for this Server instance - for use with Parameterized publishing.
Expand the help for Parameterized publishing for more details.
String
ftpCredentials
If you want to use different credentials from those configured for this server, or if the credentials have not been specified for this server, then enable this option and set the username and password to use.
username
String
password
String
continueOnError
boolean
failOnError
boolean
alwaysPublishFromMaster
Select to publish from the Jenkins master.
The default is to publish from the server that holds the files to transfer (workspace on the agent, or artifacts directory on the master)
Enabling this option could help dealing with strict network configurations and firewall rules.
This option will cause the files to be transferred through the master before being sent to the remote server, this may increase network traffic, and could increase the build time.
boolean
masterNodeName
Set the NODE_NAME for the master Jenkins.
Set this option to give a value to the NODE_NAME environment variable when the value is missing (the Jenkins master).
This is useful if you use the NODE_NAME variable in the remoteDirectory option and the build may occur on the master.
String
paramPublish
parameterName
String
Please submit your feedback about this page through this quick form.
Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?
See existing feedback here.