如何在VSTS中成功添加本地TeamCity服务端点? [英] how to add the on premise TeamCity service endpoint successfully in VSTS?

查看:81
本文介绍了如何在VSTS中成功添加本地TeamCity服务端点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在VSTS中创建SSDT项目的发布步骤,但是构建工件在TeamCity中可用.为此,我安装了用于发布管理的TeamCity工件扩展在VSTS中.

在VSTS中安装了以上扩展名之后,然后尝试将构建工件链接到发布配置.因此,我尝试配置TeamCity端点并验证与TeamCity的连接.然后我得到了如下屏幕截图所示的错误.

接下来,我尝试在TeamCity的VSTS版本创建中添加构建工件,如下面的屏幕快照所示.但是,在下拉列表中没有项目和构建配置.

那么,有人可以告诉我如何尽快解决以上错误吗?

解决方案

您只能通过确保TeamCity服务器可从Internet寻址(例如具有正确的域名,ssl证书并通过防火墙公开)来解决该错误消息).这样,VSTS可以通过TeamCity服务器检查在此处显示哪些数据.

  • 配置服务器URL .
  • 配置SSL (客户端证书VSTS不支持身份验证.)
  • 请务必检查您的Team City服务器的安全性,不要轻易暴露它,因为Team City代理将能够在您的服务器上执行代码!

但是您不必为了使用端点而执行此操作.您可以手动输入正确的信息,并且在内部运行的代理将能够很好地连接到Team City.不会有智能感知,不会自动完成,也不会进行验证.

您可以您可以使用加密来为您的服务器获取免费证书.

I am trying to create the release steps for SSDT project in VSTS but the build artifacts are available in TeamCity. For that I installed TeamCity artifacts for Release Management extension in VSTS.

After installed above extension in VSTS, then I am trying to link the build artifacts to release configuration. so, I tried to configure the TeamCity endpoint and verifying the connection to the TeamCity. Then I got the error like below screenshot.

Next I tried to add the build artifacts in VSTS release creation from TeamCity like shown in below screenshot. But in that no projects and build configuration are appeared in the dropdown list.

So, can anyone tell me how to resolve the above error as soon as possible?

解决方案

You can only solve that error message by ensuring that your TeamCity server is addressable from the internet (e.g. has a proper domain name, ssl certificate and exposed through the firewall). That way VSTS can check with the TeamCity server what data to show here.

  • Configure the server URL.
  • Configure SSL (client certificate authentication is not supported by VSTS).
  • Be sure to check the security of your Team City Server, don't expose it lightly, as Team City agents will be able to execute code on your servers!

But you do not have to do this in order to use the endpoint. You can manually enter the right information and the agent that's running on-premise will be able to connect to Team City just fine. There will be no intellisense, no auto-complete and no validation.

You can use the VSTS Artefact variables to make sure other tasks know the correct path to where your files are stored. Alternatively, queue a release on a local agent and inspect the agent's work folder to see where files are being dropped.

Alternatively, you can let Team City publish to the VSTS Package Management repository so the artefacts are available as artefact source in VSTS. Unfortunately, there is no trigger support for package Management (yet?).

To list projects, versions and artefacts you need the following connections enabled in your firewall/configuration:

[VSTS] --- https ----> [Team City]

To have the agent pull the artefacts from Team City you need:

[VSTS] <--- https --- [VSTS Agent] --- http(s) ---> [Team City]

If your connection is localhost that means that the [VSTS Agent] and [Team City] must be the same machine. Since the agent will do a local loopback connection to connect to Team City.

[VSTS] <--- https --- [VSTS Agent] --- http(s) ---. 
                      [Team City]  <--------------|

VSTS doesn't support all authentication modes available in Team City. I suppose you'll need Basic Auth and/or Windows Auth for VSTS to be able to connect. You can't use SSL client certificates. Since VSTS must trust the Team City server you also need a proper SSL cert and can't use a self-signed certificate.

if you want to use a free certificate, you can use let's Encrypt to get a free cert for your server.

这篇关于如何在VSTS中成功添加本地TeamCity服务端点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆