Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can use the SFTP Download task to transfer files and directories from a remote SFTP server to the local working directory

This task is available after installing the MettleCI - SFTP Plugin (
Info
titleTask Availability
Page Properties
hiddentrue
idbamboo-plugin

Task Name

SFTP Download Task

Plugin Name

dm-bamboo-sftp-plugin-<version>.jar

) which contains the following tasks:499089450 - Transfer files from a remote

YAML Reference

mci-sftp-download

Included Components

Bamboo SFTP Download Task, Bamboo SFTP Upload Task

You can use the SFTP Download task to transfer files and directories from a remote SFTP server to the local working directory

Using the SFTP

...

Configuration Steps

Download Task user interface

  1. Navigate to the Tasks configuration tab for the job (this will be the default job if creating a new plan).

  2. Click the name of an existing SFTP Download task

...

  1. or click Add Task and then search 'SFTP' to easily locate the SFTP Download task type, in order to create a new task.

  2. Complete the following settings:

Task Description

A description of the task, which is displayed in Bamboo.

Disable this task

Check, or clear, to selectively run this task.

Host

The hostname or IP address of the remote server to which the files will be copied.

Authentication Type

Username and Password - Enter username and password to use when connecting to remote host.

SSH Private Key - Browse to the SSH private key with which to authenticate with the remote host.  A passphrase for the key can be supplied if required.

Remote Directory

The path to the download source directory on the remote server

Include Pattern

A comma separated list of files to be downloaded relative to the remote directory path.  You can use Ant-style pattern matching to include multiple files, such as **/target/*.jar

Local Directory

The path to the download destination directory (relative to the Bamboo working directory).

Verify remote host fingerprint on connect

Enter the host fingerprint to be verified.  See below for more details.

Port

The port number of the remote host that is used for the SSH connection. The default value is 22.

  1. Click Save

    Image Modified

Anchor
fingerprint
fingerprint
Host fingerprint

You can determine the fingerprint for a host by running:

...

The fingerprint is the part of the response shown in the screenshot below:

...

Use the SFTP Download Task in a YAML pipeline

Code Block
languageyaml
- mci-sftp-download:
    destination-dir: test-reports
    source-dir: /opt/dm/mci/reports
    transfer-pattern: ${bamboo.ProjectName}/**/*.xml
    port: '22'
    host: ${bamboo.ServerName}
    username: ${bamboo.ServerUsername}
    shared-credentials: *ssh_credentials     #SSH shared credential variable substitution
    description: Retrieve unit test results