Partilhar via


cURL Upload Files task

TFS 2017 | TFS 2015

Use this task to use cURL to upload files with supported protocols such as FTP, FTPS, SFTP, HTTP, and more.

Demands

curl

Arguments

Argument Description
files
Files
(Required) File(s) to be uploaded. Wildcards can be used.
For example, **/*.zip for all ZIP files in all subfolders
authType
Authentication Method
Default value: ServiceEndpoint
serviceEndpoint
Service Connection
(Required) The service connection with the credentials for the server authentication.
Use the Generic service connection type for the service connection
username
Username
(Optional) Specify the username for server authentication.
password
Password
(Optional) Specify the password for server authentication.
Important: Use a secret variable to avoid exposing this value
url
URL
(Required) URL to the location where you want to upload the files.
If you are uploading to a folder, make sure to end the argument with a trailing slash.

Acceptable URL protocols include DICT://, FILE://, FTP://, FTPS://, GOPHER://, HTTP://, HTTPS://, IMAP://, IMAPS://, LDAP://, LDAPS://, POP3://, POP3S://, RTMP://, RTSP://, SCP://, SFTP://, SMTP://, SMTPS://, TELNET://, and TFTP://
remotePath
Remote Directory
(Optional) If supplied, this is the sub-folder on the remote server for the URL supplied in the credentials
Default value: upload/$(Build.BuildId)/
options
Optional Arguments
(Optional) Arguments to pass to cURL.
redirectStderr
Redirect Standard Error to Standard Out
Adds --stderr - as an argument to cURL. By default, cURL writes its progress bar to stderr, which is interpreted by the build as error output. Enabling this checkbox suppresses that behavior
Default value: true

Open source

This task is open source on GitHub. Feedback and contributions are welcome.

FAQ

Where can I learn more about file matching patterns?

File matching patterns reference

Where can I learn FTP commands?

List of raw FTP commands

Do I need an agent?

You need at least one agent to run your build or release.

I'm having problems. How can I troubleshoot them?

See Troubleshoot Build and Release.

I can't select a default agent pool and I can't queue my build or release. How do I fix this?

See Agent pools.

My NuGet push task is failing with the following error: "Error: unable to get local issuer certificate". How can I fix this?

This can be fixed by adding a trusted root certificate. You can either add the NODE_EXTRA_CA_CERTS=file environment variable to your build agent, or you can add the NODE.EXTRA.CA.CERTS=file task variable in your pipeline. See Node.js documentation for more details about this variable. See Set variables in a pipeline for instructions on setting a variable in your pipeline.

I use TFS on-premises and I don't see some of these features. Why not?

Some of these features are available only on Azure Pipelines and not yet available on-premises. Some features are available on-premises if you have upgraded to the latest version of TFS.