如何排除构建管道中的文件并以正确的文件夹结构进行部署?

时间:2020-03-03 07:17:46

标签: azure azure-devops

这是我的构建管道。 enter image description here

enter image description here

enter image description here

enter image description here

当我运行此管道时,所有文件都排除在外。但是,当要在服务器上部署它时,它将使用_PublishedWebsite / Eworkbook /的路径,之后所有文件都将出现。

我要删除该文件夹。另外,我已从此链接获取参考。 Exclude/Skip files in VSTS Build and release

1 个答案:

答案 0 :(得分:0)

但是,当要在服务器上部署它时,它将使用_PublishedWebsite / Eworkbook /路径,之后所有文件都将出现。

如果问题发生在部署部分,则共享发布管道将有助于找到问题的原因。

我基于共享的图像创建了构建管道,并且构建工作良好,并成功在“ $(build.artifactstagingdirectory)/web/EworkBook.zip”处生成了名为“ drop”的工件。

enter image description here

然后,我创建了发布管道,以使用此构建的工件来部署我的网站。从构建中添加工件:

enter image description here

然后使用IIS网站部署模板测试我们是否可以获得正确的工件,并且如您在日志中所见,可以下载正确的工件:

enter image description here

无论如何,如果上述方法不适合您,您还可以使用Download Build Artifacts task下载特定的工件:

enter image description here

相关问题