Share via


FtpUpload@1 - FTP upload v1 task

Use this task to upload files to a remote machine using FTP or securely with FTPS.

Inputs

credentialsOption - Authentication Method
Input alias: credsType. string. Required. Allowed values: serviceEndpoint (FTP Service Endpoint), inputs (Enter Credentials). Default value: serviceEndpoint.

Specifies the authentication method. Use an FTP service connection or enter connection credentials.


serverEndpoint - FTP Service Endpoint
string. Required when credsType = serviceEndpoint.

Specifies the service connection for the FTP server. To create one, click the Manage link and create a new generic service connection, and then enter the FTP server URL for the server URL, e.g. ftp://server.example.com, and the required credentials.

Secure connections will always be made regardless of the specified protocol (ftp:// or ftps://) if the target server supports FTPS. To allow only secure connections, use the ftps:// protocol, e.g. ftps://server.example.com. Connections to servers not supporting FTPS will fail if ftps:// is specified.


serverUrl - Server URL
string. Required when credsType = inputs.

Specifies the URL for the FTP server.


username - Username
string. Required when credsType = inputs.

Specifies the user name for the FTP connection.


password - Password
string. Required when credsType = inputs.

Specifies the password for the FTP connection.


rootDirectory - Root folder
Input alias: rootFolder. string. Required.

Specifies the source folder to upload files from.


filePatterns - File patterns
string. Required. Default value: **.

Specifies the file paths or patterns of the files to upload. The string supports multiple lines of minimatch patterns. Learn more about file matching patterns.


remoteDirectory - Remote directory
Input alias: remotePath. string. Required. Default value: /upload/$(Build.BuildId)/.

Specifies the directory on the remote FTP server where the task uploads files.


clean - Delete remote directory
boolean. Default value: false.

Deletes the remote directory, including its contents, before uploading.


cleanContents - Clear remote directory contents
boolean. Optional. Use when clean = false. Default value: false.

Recursively deletes all content in the remote directory before uploading. The existing directory will not be deleted. For better performance, use clean instead.


overwrite - Overwrite
boolean. Default value: true.

Overwrites existing files in the remote directory.


preservePaths - Preserve file paths
boolean. Default value: false.

If selected, the relative local directory structure is recreated under the remote directory where files are uploaded. Otherwise, files are uploaded directly to the remote directory without creating additional subdirectories.

For example, suppose your source folder is /home/user/source/, which contains the file foo/bar/foobar.txt, and your remote directory is: /uploads/. If this boolean is selected, the file is uploaded to /uploads/foo/bar/foobar.txt. If this boolean is not selected, the file is uploaded to /uploads/foobar.txt.


trustSSL - Trust server certificate
boolean. Default value: false.

Trusts the FTP server's SSL certificate with ftps://, even if it is self-signed or cannot be validated by a certificate authority (CA).


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Remarks

Use this task to upload files to a remote machine using FTP or securely with FTPS.

Where can I learn more about file matching patterns?

Requirements

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version All supported agent versions.
Task category Utility