Document toolboxDocument toolbox

SFTP Upload Bamboo Task

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

Task Availability

This task is available after installing the MettleCI - SFTP Plugin (dm-bamboo-sftp-plugin.jar) which contains the following tasks:

SFTP Download Bamboo Task - Transfer files from a remote server to the local working directory

SFTP Upload Bamboo Task - Transfer files in the local working directory to a remote server

Configuration Steps

  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, or click Add Task and then search 'SFTP' to easily locate the SFTP Upload task type, in order to create a new task.
  3. Complete the following settings:

    Task DescriptionA description of the task, which is displayed in Bamboo.
    Disable this taskCheck, or clear, to selectively run this task.
    HostThe hostname or IP address of the remote server to which the files will be copied.
    Authentication TypeUsername 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.
    Local DirectoryThe path to the upload source directory (relative to the Bamboo working directory).
    Include Pattern

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

    Remote DirectoryThe path to the upload destination directory on the remote server
    Verify remote host fingerprint on connectEnter the host fingerprint to be verified.  See below for more details.
    PortThe port number of the remote host that is used for the SSH connection. The default value is 22.
  4. Click Save

Host fingerprint

You can determine the fingerprint for a host by running:

ssh-keygen -l -F <HOSTNAME>

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



© 2015-2024 Data Migrators Pty Ltd.