在 teamcity 中使用 msbuild 部署到远程服务器

发布于 2024-09-10 05:05:01 字数 349 浏览 6 评论 0原文

好吧,我已经搜索了几天了,但仍然没有找到我认为是解决这个问题的优雅解决方案。

这就是我想要发生的事情。

  • 我希望 TeamCity 构建我的代码
  • ,然后对其进行测试
  • ,然后将其部署到远程服务器。

前两个很简单,但似乎没有人有一个很好的部署选择。我已经设置了支持 Web 部署的服务器(以前称为 msdeploy?),并且可以从本地计算机将其发布到远程服务器。

我理想地希望 teamcity 能够允许在成功构建和测试后远程发布网站。

请告诉我有人能解决这个问题!我很高兴快到周五了,因为我快要哭了,需要酒精来帮助我。

提前致谢。

OK, I've searched for a few days now and still haven't found what i would deem to be an elegant solution to this problem.

Here's what I want to happen.

  • I want TeamCity to Build my code
  • Then test it
  • Then deploy it to a remote server.

The first 2 are easy, but nobody seems to have a nice option for deploying. I have set up the server with web deploy support (was it previously known as msdeploy?) and from my local machine i can publish it to the remote server.

I would ideally like teamcity to be able to allow for the web site to be published remotely after successfully building and testing.

Please tell me somebody has a solution to the problem! I am glad it's almost friday as i am close to tears and need alcohol to help me.

Thanks in advance.

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

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

发布评论

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

评论(2

难如初 2024-09-17 05:05:02

我们做了一些非常相似的事情,但将最后一个任务分离到它自己的构建中,该构建计划每晚部署最近的成功构建,以阻止每次开发人员提交时网站上下波动。我们没有使用 msdeploy,但您可能会发现以下链接很有用:

使用 TeamCity、部署项目和项目进行自动部署SVN

Web 部署非常棒:如果您使用 XCopy,那么您就做到了错误

Web 打包:使用以下方式创建 Web 包MSBuild

We do something very similar but separate the last task out into it's own build which is scheduled to deploy the most resent successful build on a nightly basis to stop the website going up and down every time a developer commits. We didn't use msdeploy but you may find the following links usefull:

Automated deployments with TeamCity, Deployment projects & SVN

Web Deployment Made Awesome: If You're Using XCopy, You're Doing It Wrong

Web Packaging: Creating web packages using MSBuild

潜移默化 2024-09-17 05:05:02

我也在研究同样的问题。到目前为止我有两个丑陋的解决方案:

1)使用固定的工作目录文件夹。然后代码总是被编译到同一个地方。从 bin\RELEASE 文件夹到目标服务器或文件夹执行 XCOPY/FTP。

2) 编写一个脚本,使用一些大版本号 (999) 搜索工件文件夹,然后检查每个较小的版本号,直到找到具有该版本号的文件夹。如果您通过curl & 获取工件,也可以对URL 执行此操作。工件网页。

3) 在这样的网站上发布问题,直到我可以找到一些 msbuild 属性、环境变量或其他类似设备来获取工件 URL 或文件系统路径(了解 teamcity 支持在服务器场上构建,因此可能需要文件系统路径)包含 UNC 名称以确定它来自哪里)

I'm working on the same issue, too. I have two ugly solutions so far:

1) Use a fixed working directory folder. Then code is always compiled to the same place. Do an XCOPY/FTP from the bin\RELEASE folder to your target server or folder.

2) Write a script that searches the artifact folder using some large version number (999) and then checking each smaller version number until you find a folder with that version number. This also can be done for the URL if you are getting your artifacts via curl & the artifacts web page.

3) Post questions on sites like this until I can find out some msbuild property, environment variable or other similar device to get the artifact URL or filesystem path to it (understanding that teamcity supports building on server farms, so a file system path might need to include a UNC name to know for sure where it is coming from)

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