Bamboo での SCP タスクの使用
Bamboo SCP タスクを使用すると、Bamboo ジョブの一環として、Bamboo ディレクトリから、リモート サーバーにファイルをアップロードすることができます。SCP タスクでは、複数のファイルをコピーすることができます。コピーされたファイルのディレクトリ構造は保持されます。
Bamboo 展開タスクの概要については、「展開タスクの設定」を参照してください。
SCP タスクを設定する方法:
- ジョブのタスク設定タブに移動します(新しいプランを作成するとデフォルト ジョブとなります)。
- 既存の SCP タスクの名前をクリックするか、タスクの追加、SCP タスクをクリックして、新しいタスクを作成します。
Complete the following settings:
Task Description
Helps you identify the purpose of the task.
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.
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.
Username
The username to use to connect to the remote host.
Authentication Type
Password – the password associated with Username.
Key without passphrase – browse to the SSH private key with which to authenticate with the remote host.
Key with passphrase – browse to the SSH private key, and supply the passphrase, to use to authenticate with the remote host.
Local Path
The local path (relative to the Bamboo working directory) to the files you want to copy. Use commas to separate files and directories. You can also use Ant-style pattern matching to include multiple files, such as**/target/*.jar
.
Remote Path
The path to the destination directory on the remote server.- 保存をクリックします。
ホスト フィンガープリント
以下のコマンドを実行して、ホストのフィンガープリントを判断することができます。
ssh-keygen -l -F <HOSTNAME>
以下のスクリーンショットに示すように、フィンガープリントはレスポンスの一部です。