尝试使用 Bamboo 和 MSDeploy

发布于 2024-11-04 15:55:23 字数 758 浏览 5 评论 0原文

我在 Bamboo 中创建了一个指向 MSDeploy 可执行文件的构建器。 我想在部署新网站之前备份当前网站。

这是我运行的命令行: "C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:contentPath="默认网站\MyService",computerName="myserver" -dest:package="MyService_backup_before_43.zip" -所以

我设置了一个新的 MSDeploy 构建器以指向“C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe” 然后我选择我的构建器为 MSDeploy。

论据是: -verb:sync -source:contentPath="Default Web Site\MyService",computerName="myserver" -dest:package="MyService_backup_before_43.zip" -enableLink:AppPoolExtension

但是 MSDeploy 一直抱怨: 无法识别的参数“”-source:contentPath =“默认”。所有参数必须以“-”开头。

竹子把论点搞得一团糟,显然是为了耍聪明。但是我需要它来将双引号(“)保留在原来的位置。

我已经尝试了我能想到的所有单引号和双引号的组合,即在所有参数前面,仅在有空格的参数前面,或者只有那些有报价的人

知道如何让它发挥作用吗?

I have a builder in Bamboo that I've created pointing to MSDeploy executable.
I want to take a backup of the current web site before I deploy the new one.

Here is the command line that I'd run:
"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:contentPath="Default Web Site\MyService",computerName="myserver" -dest:package="MyService_backup_before_43.zip" -enableLink:AppPoolExtension

So I've setup a new MSDeploy builder to point to "C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe"
And then I choose my builder to be MSDeploy.

And the argument is:
-verb:sync -source:contentPath="Default Web Site\MyService",computerName="myserver" -dest:package="MyService_backup_before_43.zip" -enableLink:AppPoolExtension

However MSDeploy keeps complaining that:
Unrecognized argument '"-source:contentPath="Default'. All arguments must begin with "-".

Bamboo messes about with the argument line obviously to try and be smart. However I need it to keep the double quotes (") where they are.

I've tried every combination of single and double quotes I can think of, i.e. in front of all the arguments, in front of only the ones that have spaces, or only the ones that have quotes.

Anyone know how to get this to work please?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

·深蓝 2024-11-11 15:55:23

我有同样的问题,但没有找到解决方案,是吗?

作为解决方法,您可以删除源中的空格。你应该更改

"Default Web Site\MyService"

"DefaultWebSite\MyService"

I have same problem and didn't find the solution, did you?

As a workaround you can get rid of spaces in your source. You should change

"Default Web Site\MyService"

to

"DefaultWebSite\MyService"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文