问题描述
背景
作为部署流程的一部分,我们通过在构建工件上运行多个.xdt转换并添加其他文件来创建部署工件.
作为发布前的最后一步,我们想调用msdeploy.exe,从包含wwwroot-content的文件夹中构建一个自定义" webdeploy软件包-(用于在此问题中找到的用于创建自定义软件包的msdeploy命令
然后使用发布构建工件输出 msdeploy.exe
,我可以在托管代理 vs2017-win2016 和 windows-2019 :
因此,托管代理 vs2017-win2016 和 windows-2019 上的msdeploy路径为 C:\ Program Files(x86)\ IIS \ MicrosoftWeb部署V3 \ msdeploy.exe
.我们可以使用命令行任务来调用它.
希望这会有所帮助.
Background
As part of our deployment pipeline we are creating our deployment artifact, by running several .xdt transforms on our build artifact as well as adding several additional files.
As the last step before publishing, we would like to invoke msdeploy.exe to build a "custom" webdeploy package from a folder containing the wwwroot-content - (msdeploy command for creating custom package found in this question Web Deploy - How to create a package with selected items)
We are using hosted agents (win 2017).
We wish to deploy to an Azure AppService.
Question
Is there a task in Azure DevOps, that allows you to invoke MsDeploy.exe manually, such that we can create a custom webdeploy package, before we deploy?
I am afraid there is no such task to invoke MsDeploy.exe manually. We need invoke it by command line task, just like Daniel comment.
As we know, the default installation will place msdeploy.exe
in:
C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe
To verify the msdeploy path on the hosted agents, I use a copy task with content **\msdeploy.exe
:
Then use the Publish build artifacts to output the msdeploy.exe
, I could get the result on the hosted agent vs2017-win2016 and windows-2019:
So, the the msdeploy path on the hosted agents vs2017-win2016 and windows-2019 is C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe
. We could use command line task to invoke it.
Hope this helps.
这篇关于在Azure Devops中手动调用MsDeploy.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!