Back to Website
Show / Hide Table of Contents

upload-to-ftp

  • Last updated on December 29, 2023
  • •
  • 1 minute to read

This task uploads the specified artifact to FTP/SFTP.

Parameters

  • protocol - Specifies the protocol, either ftp or sftp.
  • host - Host address.
  • port - Port for access; can be omitted (defaults: FTP - 21, SFTP - 22).
  • username - Username for server access.
  • password - Password for server access.
  • usePassive - Setting for FTP protocol: passive mode.
  • useBinary - Setting for FTP protocol: binary data transfer mode.
  • useSsl - Setting for FTP protocol: encryption mode.

For each artifact listed in inputArtifacts, a path for the file must be specified as follows: "<artifact_name>": "<remote_path>". If the path includes subfolders, the handler checks for the existence of those folders and attempts to create them if necessary. For example:

"design": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/source-design-{{project.id}}"

Processing of artifact groups is supported. The symbol * indicates the insertion point for the artifact index in the file path, for example:

"result*": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/print-file-*-{{project.id}}"

Overriding the path for a specified artifact in the group is also supported, for example:

"result1": "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/override-name-for-the-first-result"

These parameters support argument interpolation following the common rules.

Example

{
    "description": "Upload to FTP",
    "name": "upload-to-ftp",
    "type": "upload-to-ftp",
    "inputArtifacts": [
        "design",
        "result*"
    ],
    "parameters": {
        "protocol": "ftp",
        "host": "ftp.example.com",
        "port": 21,
        "username": "user1",
        "password": "12345",
        "usePassive": true,
        "useBinary": true,
        "enableSsl": true,
        "design" : "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/source-design-{{project.id}}",
        "result*" : "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/print-file-*-{{project.id}}",
        "result1" : "/site/wwwroot/App_Data/{{project.id}}/{{project.orderNumber}}/override-name-for-the-first-result"
    },
    "outputArtifacts": []
}
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2024 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback