构建完成后自动下载 TeamCity 构建工件

发布于 2024-11-07 13:38:34 字数 64 浏览 4 评论 0原文

是否可以将 TeamCity Eclipse 插件设置为在构建完成后自动下载构建工件?我一直在寻找,但找不到办法。

is it possible to set the TeamCity Eclipse plug-in to automatically download build artifacts once the build is complete? I've been looking, but can't find a way to do it.

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

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

发布评论

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

评论(1

心奴独伤 2024-11-14 13:38:34

Ahar 但来自风滚草的答案...但不幸的是它不涉及 Eclipse 插件

  1. 您需要在您的开发计算机/您想要部署工件的计算机上安装一个额外的代理。

  2. 创建一个空的/不执行任何操作的新构建(即创建构建并在创建后立即保存/取消它,甚至不添加源代码管理连接)

  3. 向构建添加工件依赖项,这位于构建的依赖部分。工件依赖性告诉代理从不同的构建中提取工件。您选择要从中提取工件的构建,指定工件(可以包含通配符),然后选择要将文件下载到/提取到的目标文件夹。

  4. 添加一个构建触发器,在您的主构建成功的地方创建此构建触发器,即您有一个工件要下载。

  5. 添加代理要求,teamcity.agent.name 是在您的开发计算机/部署计算机上运行的代理的名称...

总结,当您的主要构建成功时,teamcity 将在您的部署机器/开发机器上运行的代理上触发此辅助构建,该代理会拉入工件并将其解压缩到正确的位置,(和如果您想运行其他命令,例如安装数据库)

这对于测试服务器的自动化部署非常有效,此方法的唯一缺点是您会用完构建代理许可证并为您想要执行此操作的每台计算机进行构建。但自动部署到远程计算机的优点大于缺点。

Ahar but from the tumbleweed comes an anwser... but it unfortunately doesn't involve the eclipse plugin

  1. You need to install an additional agent on your development machine/the machine you want the artifacts deployed to.

  2. Create a new Build that is empty/does nothing, (ie create the build and save/cancel it as soon as you have created it, don't even add a Source Control connection)

  3. Add an Artifact Dependency to the Build, this is in the Dependancies part of the Build. An artifact dependency tells an agent to pull in an artifact from a different Build. You choose the Build you want the artifact to be pulled in from, you specify an artifact (which can include an wildcard), and you choose a destination folder to where you want the files downloaded to/extracted.

  4. Add a Build Trigger, make this Build trigger where your main build succeeds, ie you have an artifact to download.

  5. Add an Agent Requirement, teamcity.agent.name is the name of the agent running on your development machine/deployment machine...

Summary, when your primary Build succeeds, teamcity will fire off this secondary Build on the agent running on your deployment machine/development machine which pulls in the artifact(s) and unzips them to the correct location, (and if you want runs additional commands such as installing a database)

This works really well for automated deployments of test servers, the only disadvantage to this method is you use up a Build Agent Licence and Build for every machine you want to do this on. But the advantage of automated deployment to remote machine outweighs the disadvantage.

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