竹SCP插件:如何查找目录 [英] Bamboo SCP plug-in: how to find directory

查看:246
本文介绍了竹SCP插件:如何查找目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想上传一个文件使用SCP任务的远程服务器。有问题的远程服务器上我已经OpenSSH的配置,而且我在使用运行Windows Server 2008 R2与Cygwin的一个Amazon EC2实例运行竹构建服务器。

I am trying to upload a file to a remote server using the SCP task. I have OpenSSH configured on the remote server in question, and I am using an Amazon EC2 instance running Windows Server 2008 R2 with Cygwin to run the Bamboo build server.

我的问题是关于寻找我想要使用的目录。我要上传了C的全部内容:\ DOC使用SCP。该文件指出,我必须使用本地路径相对于竹工作目录,而不是一个绝对的目录名。

My question is regarding finding the directory I wish to use. I want to upload the entire contents of C:\doc using SCP. The documentation notes that I must use the local path relative to the Bamboo working directory rather than an absolute directory name.

我发现了构建计划的工作目录是 / cygdrive / C /积累DIR / CDP-DOC-JOB1在运行 PWD 。所以去DOC,我可以运行光盘../../ DOC 。然而,当我设下的SCP的配置我的工作目录 ../../ DOC / ** (使用的这个模式匹配指南),我得到的消息目前还没有要上传的文件。的登录。

I found by running pwd during the build plan that the working directory is /cygdrive/c/build-dir/CDP-DOC-JOB1. So to get to doc, I can run cd ../../doc. However, when I set my working directory under the SCP configuration as ../../doc/** (using this pattern matching guide), I get the message There were no files to upload. in the log.

C:\ DOC包含子文件夹,以及在根目录下的文本文件

C:\doc contains subfolders as well as a textfile in the root directory.

下面是我的SCP任务配置:

Here is my SCP task configuration:

下面是cygwin的版本看看我的目录:

Here is a look from cygwin at my directory:

推荐答案

您可以添加第一个脚本任务中运行的Windows外壳程序,即复制一切从 C:\ DOC 一些本地目录,然后运行SCP任务到这个新目录中的内容复制到远程服务器

You may add a first "script" task running a Windows shell, that copies everything from C:\doc to some local directory, and then run the scp task to copy the content of this new directory onto your remote server

mkdir doc 
xcopy c:\doc .\doc /E /F

随后的模式拷贝应该是 / DOC / **

这篇关于竹SCP插件:如何查找目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆