测试后使用MS Build进行部署

发布于 2024-12-11 11:44:13 字数 278 浏览 0 评论 0原文

我有一个网络项目,其结构如下:

网站 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 技术交流群。

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

发布评论

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

评论(1

无声情话 2024-12-18 11:44:13

这可能是詹金斯的一个错误。请参阅此错误 (或这个)。请参阅评论以了解可能的解决方法。

This is probably a bug in Jenkins. See this bug (or this one). See comments for possible workarounds.

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