FTPUpload
An FTP Upload build step.
Example. Adds an FTP Upload build step with FTPS security connection mode, private protection mode, authentication via username and password, binary transfer mode and active FTP mode. See options in documentation.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
ftpUpload {
name = "My FTP Upload step"
targetUrl = "8.8.8.8"
securityMode = FTPUpload.SecurityMode.FTPS
dataChannelProtection = FTPUpload.DataChannelProtectionMode.PRIVATE
authMethod = usernameAndPassword {
username = "username"
password = "credentialsJSON:******"
}
ftpMode = FTPUpload.FTPMode.ACTIVE
transferMode = FTPUpload.TransferMode.BINARY
sourcePath = """
dir/**/*.zip
*.zip => winFiles
unix/distro.tgz => linuxFile
""".trimIndent()
}
Content copied to clipboard }
}See also
Constructors
Types
Properties
Authentication method.
Optional collection of build step execution conditions
Choose a data protection scheme if FTPS or FTPES is used.
Build step execution mode
FTP Mode.
Choose between an insecure and a secure connection (FTPS, FTPES).
Newline- or comma-separated paths to files/directories to be deployed. Ant-style wildcards like dir/**/*.zip and target directories like *.zip => winFiles,unix/distro.tgz => linuxFiles, where winFiles and linuxFiles are target directories, are supported.
Optional. An FTP transfer mode to force.
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
A list of records, each field of an item stored as a parameter of its own: parameter f of the n-th item, counting from 1, is stored as name.n.f. A script fills the list in the block of the parameter, see RecordList.
A record, each field stored as a parameter of its own: parameter f of the record is stored as name.f. A script fills the record in the block of the parameter; a record without parameters stores nothing.
Validates this object and reports found errors to the provided consumer