测试后使用MS Build进行部署
我有一个网络项目,其结构如下:
网站 WebSite.test
在测试项目中,我有所有单元测试(使用微软测试框架)。在 WebSite 项目中,我有一个使用 MSDeploy 部署站点的目标、MSDeployPublish 目标和 DeployOnBuild=true。然后我使用 Jenkins 运行此构建。问题是,使用此设置,站点将在测试之前进行部署。
我可以在 Jenkins 中添加另一个构建步骤,以便首先构建整个解决方案,然后运行部署项目。然而,我希望这一切都能一步到位。这有可能吗?
I have a web project structured the following way:
WebSite
WebSite.test
In the test project, I have all the unit tests (using Microsoft test framework). In the WebSite project I have a target to deploy the site using MSDeploy, the MSDeployPublish target, and DeployOnBuild=true. I then run this build using Jenkins. The problem is that using this setup, the site will get deployed before it's tested.
I could add another build step in Jenkins, so that the entire solution is built first, then the deploy projects are run. However, I would like for it all to be in one step. Is this at all possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能是詹金斯的一个错误。请参阅此错误 (或这个)。请参阅评论以了解可能的解决方法。
This is probably a bug in Jenkins. See this bug (or this one). See comments for possible workarounds.