Windowsでシェフを使用してSVNからファイルをダウンロードする
-
21-12-2019 - |
質問
シェフがファイルをダウンロードするのに問題があります.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 Runの出力です:
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
.
サーバからファイルをダウンロードして宛先に配置します。さて、私はexecuteブロックにこのコマンドを書くことができますが、これをやり直してください。Windows上のSVN Repoから特定のファイルをダウンロードする方法は?
解決
これはChefのバグで、文書化されたこちら
これを理解するために、私はこれらの線に私を導いたchef-client -l debug > log.txt
を実行しました:
[2014-01-10T09:35:00-05:00] INFO: Processing subversion[download installer] action export (common::svntest line 12)
[2014-01-10T09:35:00-05:00] DEBUG: subversion[download installer] export destination C:\chef-repo\cookbooks\common\files already exists or is a non-empty directory - nothing to do
.
この時点で、私が必要なファイルをつかむために単に実行リソースを使うつもりで、opscodeがこの長い間にこの長いバグを修正するために回避することを願っています。
所属していません StackOverflow