我无法让厨师下载我需要在SVN服务器中的配方中使用的文件。

subversion "download installer" do
  repository "http://svnrepourl/path/to/installer.msi"
  revision "HEAD"
  destination "C:\\chef-repo\\cookbooks\\common\\files"
  action :export
  svn_username "username"
  svn_password "password"
end
.

以下是Chef-Client运行的输出:

Compiling Cookbooks...
Converging 1 resources
Recipe: common::svntest
  * subversion[download installer] action export[2014-01-09T14:41:42-05:00] INFO
: Processing subversion[download installer] action export (common::svntest line
12)
 (up to date)
[2014-01-09T14:41:42-05:00] INFO: Chef Run complete in 1.482104 seconds
[2014-01-09T14:41:42-05:00] INFO: Running report handlers
[2014-01-09T14:41:42-05:00] INFO: Report handlers complete
Chef Client finished, 0 resources updated
.

第12行是“subversion”下载安装程序“do”。不是超级有用的输出 - 我不知道在这里的帽子下发生了什么。它不会在我的系统上的任何位置下载文件 - 目标目录为空。

运行此命令工作正常:

svn export -r HEAD http://svnrepourl/path/to/installer.msi --username username --password password C:\chef-repo\cookbooks\common\files
.

它成功从服务器下载文件并将其放在目标中。现在,我可以在执行块中写下这个命令,但我想这样做厨师方式。如何从Windows上从SVN repo下载特定文件?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top